2008-05-29 03:16:22 +08:00
|
|
|
#!/bin/sh
|
2009-08-20 06:36:53 +08:00
|
|
|
# Run petitboot at first startup, otherwise run a login.
|
2008-05-29 03:16:22 +08:00
|
|
|
|
2009-08-20 06:36:53 +08:00
|
|
|
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
|