Skip to content

Instantly share code, notes, and snippets.

@u0d7i
Last active August 29, 2015 14:26
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save u0d7i/b86d2ebe5635910e2915 to your computer and use it in GitHub Desktop.
Save u0d7i/b86d2ebe5635910e2915 to your computer and use it in GitHub Desktop.
N900 - usbnet and sshd on connect in PC Suite mode
Nokia-N900:~# diff -u /usr/sbin/pcsuite-enable.sh.dist /usr/sbin/pcsuite-enable.sh
--- /usr/sbin/pcsuite-enable.sh.dist 2000-01-01 15:50:20.000000000 +0200
+++ /usr/sbin/pcsuite-enable.sh 2000-01-01 15:54:25.000000000 +0200
@@ -71,4 +71,8 @@
kill -USR1 $SYNCD_PID
logger "$0: sent SIGUSR1 to syncd"
+# mod:
+# enable usbnet and start sshd
+/sbin/ifup usb0
+/etc/init.d/ssh start
exit 0
Nokia-N900:~# diff -u /usr/sbin/pcsuite-disable.sh.dist /usr/sbin/pcsuite-disable.sh
--- /usr/sbin/pcsuite-disable.sh.dist 2000-01-01 15:56:23.000000000 +0200
+++ /usr/sbin/pcsuite-disable.sh 2000-01-01 16:00:06.000000000 +0200
@@ -21,4 +21,8 @@
logger "$0: do nothing to pass USB certs"
+# mod
+# stop sshd and disable usbnet on disconnect
+/etc/init.d/ssh stop
+/sbin/ifdown usb0
exit 0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment