Selaa lähdekoodia

Add more info on the serial-port

Joachim M. Giæver 2 vuotta sitten
vanhempi
commit
85eb827299
2 muutettua tiedostoa jossa 15 lisäystä ja 6 poistoa
  1. 14 0
      src/helper/env-wrapper
  2. 1 6
      src/helper/functions

+ 14 - 0
src/helper/env-wrapper

@@ -72,6 +72,20 @@ if [ ${OPT_HELP} = true ]; then
     echo "Other commands"
     echo "Disable the daemon:       $ ${SNAP_NAME}.disable"
     echo "Restart the daemon:       $ ${SNAP_NAME}.restart"
+    echo ""
+    echo "Info on the serial-port plug:"
+    echo " This plug requires the experimental hotplug feature in snapd."
+    echo " Enable it with"
+    echo "  $ sudo snap set system experimental.hotplug=true"
+    echo ""
+    echo " And restart snapd with:"
+    echo "  $ sudo systemctl restart snapd"
+    echo ""
+    echo " Now list available serial slots with:"
+    echo "  $ sudo snap iterface serial-port"
+    echo ""
+    echo " And connect it to ${SNAP_NAME} with:"
+    echo "  $ sudo snap connect ${SNAP_NAME}:serial-port <slot name>"
     exit 0
 fi
 

+ 1 - 6
src/helper/functions

@@ -62,13 +62,8 @@ function plugs_connected {
         echo $RAW_OUT
         echo "----- OR -----"
         echo $SERIAL_OUT
+        echo "See ${SNAP_NAME}.help for more info on the serial-port plug"
         MISSING=1
-    elif [ $RAW_RES -ne 0 ]; then
-        echo "OPTIONAL plug:"
-        echo $RAW_OUT
-    elif [ $SERIAL_RES -ne 0 ]; then
-        echo "OPTIONAL plug"
-        echo $SERIAL_OUT
     fi
 
     plug_connected "hardware-observe"