aboutsummaryrefslogtreecommitdiffstats
path: root/target/linux/ps3/petitboot/base-files/sbin/initrun
blob: 1c3363fcc8cc97ef2db210c8e007bc15384254e2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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