X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/9462cdba159035c9929d1ecb1a6705b0cfe1e079..c2b4fcb0cc6e24df1692da93ed409c723a2de3ee:/target/linux/ps3/petitboot/base-files/sbin/initrun?ds=sidebyside diff --git a/target/linux/ps3/petitboot/base-files/sbin/initrun b/target/linux/ps3/petitboot/base-files/sbin/initrun index e253c24b3..1c3363fcc 100755 --- a/target/linux/ps3/petitboot/base-files/sbin/initrun +++ b/target/linux/ps3/petitboot/base-files/sbin/initrun @@ -1,3 +1,18 @@ #!/bin/sh +# Run petitboot at first startup, otherwise run a login. -/bin/ash --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