aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ps3/petitboot/base-files/sbin/initrun
diff options
context:
space:
mode:
Diffstat (limited to 'target/linux/ps3/petitboot/base-files/sbin/initrun')
-rwxr-xr-xtarget/linux/ps3/petitboot/base-files/sbin/initrun18
1 files changed, 18 insertions, 0 deletions
diff --git a/target/linux/ps3/petitboot/base-files/sbin/initrun b/target/linux/ps3/petitboot/base-files/sbin/initrun
new file mode 100755
index 000000000..1c3363fcc
--- /dev/null
+++ b/target/linux/ps3/petitboot/base-files/sbin/initrun
@@ -0,0 +1,18 @@
+#!/bin/sh
+# Run petitboot at first startup, otherwise run a login.
+
+sbindir=/usr/sbin
+localstatedir=/var/petitboot
+
+petitboot=$sbindir/petitboot
+run_once=$localstatedir/.run-once
+
+if [ ! -f $run_once -a -x $petitboot ]; then
+ # quiet console
+ echo 3 > /proc/sys/kernel/printk
+ mkdir -p $localstatedir
+ touch $run_once
+ exec $petitboot --timeout
+fi
+
+exec /bin/ash --login