initial start
[wyse_ntpd.git] / src / buildroot-2013.05 / custom / filesystem / etc / init.d / S01custom_pre_startup
diff --git a/src/buildroot-2013.05/custom/filesystem/etc/init.d/S01custom_pre_startup b/src/buildroot-2013.05/custom/filesystem/etc/init.d/S01custom_pre_startup
new file mode 100755 (executable)
index 0000000..dd39d06
--- /dev/null
@@ -0,0 +1,37 @@
+#!/bin/sh
+
+# deal with our mounts
+mkdir /proc > /dev/null 2>&1
+mount -t proc proc /proc
+mkdir /sys > /dev/null 2>&1
+mount -t sysfs sys /sys
+mkdir -p /dev/pts > /dev/null 2>&1
+mount -t devpts devpts /dev/pts
+mount /tmp > /dev/null 2>&1
+
+
+# create out gps0
+ln -s /dev/ttyS0 /dev/gps0
+mknod -m 0664 /dev/pps0 c 252 0
+ln -s /dev/pps0 /dev/gpspps0
+
+# mount the config file system
+mkdir /fs > /dev/null 2>&1
+mount /dev/sda1 /fs > /dev/null 2>&1
+
+if [ -f /fs/config/system ]
+then
+       . /fs/config/system
+fi
+
+if [ -f /fs/config/dropbear_dss_host_key ]
+then
+       cp /fs/config/dropbear_dss_host_key /etc/dropbear
+       chmod 600 /etc/dropbear/dropbear_dss_host_key
+fi
+
+if [ -f /fs/config/dropbear_rsa_host_key ]
+then
+       cp /fs/config/dropbear_rsa_host_key /etc/dropbear
+       chmod 600 /etc/dropbear/dropbear_rsa_host_key
+fi