summaryrefslogtreecommitdiff
path: root/packages/altboot/files/altboot-menu/Advanced/55-bin-sh
blob: 90a6f37ff5f8ab88983bb63273100542d2de25bc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# !/bin/sh
M_TITLE="init=/bin/sh"


run_module() {
	
	test -e /etc/altboot.func && . /etc/altboot.func || die "ERROR: /etc/altboot.func not found. Check your installation!"
	
	test "$ASK_PW_ON_BOOT" != "yes" && verify_master_pw >/dev/tty0
	
	# Make the system a little bit more usable than a standard init=/bin/sh boot
	mount -t proc proc /proc >/dev/null 2>&1
	uname -r | grep -q "2.6." && mount sys -t sysfs /sys
	mount -o remount,rw /			
	
	echo -e "\nBoot system with 'exec /sbin/init 5'\n"
	while true
	do
		exec $SH_SHELL </dev/tty0 >/dev/tty0 2>&1
		echo "WARNING: Shell was killed!"
	done
}

case "$1" in
title)	echo "$M_TITLE";;
run)	run_module;;
esac