summary refs log tree commit diff
path: root/etc/freebsd/1
diff options
context:
space:
mode:
Diffstat (limited to 'etc/freebsd/1')
-rwxr-xr-xetc/freebsd/119
1 files changed, 12 insertions, 7 deletions
diff --git a/etc/freebsd/1 b/etc/freebsd/1
index 121ff57..2a4492d 100755
--- a/etc/freebsd/1
+++ b/etc/freebsd/1
@@ -1,12 +1,17 @@
 #!/bin/sh
 # system one time tasks
+
+PATH=/command:/sbin:/bin:/usr/sbin:/usr/bin
 trap : 2
 trap : 3
 
-/bin/sh /etc/rc autoboot && exit 0
-
-# /etc/rc crashed, start emergency shell.
-echo '/etc/rc failed. Press <enter> for emergency shell...'
-read input
-/bin/sh -p
-/sbin/reboot
+sh /etc/rc autoboot
+if test $? -ne 0; then
+  # /etc/rc crashed, start emergency shell.
+  echo '/etc/rc failed. Press <enter> for emergency shell...'
+  read input
+  sh -p
+  exec reboot
+fi
+touch /etc/runit/stopit
+chmod 0 /etc/runit/stopit