summaryrefslogtreecommitdiff
path: root/scripts/boot.sh
blob: e8b7626539669329aae8b60464e539c22550e7fc (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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
#!/bin/sh

# set -e

if [ -e /scripts/functions ]
then
	# initramfs-tools specific (FIXME)
	. /scripts/functions
fi

for _SCRIPT in /lib/live/boot/*
do
	if [ -e "${_SCRIPT}" ]
	then
		. ${_SCRIPT}
	fi
done

export PATH="/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin:/usr/bin:/usr/sbin:/bin:/sbin"

echo "/root/lib" >> /etc/ld.so.conf
echo "/root/usr/lib" >> /etc/ld.so.conf

mountpoint="/live/image"
alt_mountpoint="/media"
LIVE_MEDIA_PATH="live"

HOSTNAME="host"

mkdir -p "${mountpoint}"
tried="/tmp/tried"

# Create /etc/mtab for debug purpose and future syncs
if [ ! -d /etc ]
then
	mkdir /etc/
fi

if [ ! -f /etc/mtab ]
then
	touch /etc/mtab
fi

if [ ! -x "/bin/fstype" ]
then
	# klibc not in path -> not in initramfs
	export PATH="${PATH}:/usr/lib/klibc/bin"
fi

# handle upgrade path from old udev (using udevinfo) to
# recent versions of udev (using udevadm info)
if [ -x /sbin/udevadm ]
then
	udevinfo='/sbin/udevadm info'
else
	udevinfo='udevinfo'
fi

old_root_overlay_label="live-rw"
old_home_overlay_label="home-rw"
custom_overlay_label="custom-ov"
persistence_list="live-persistence.conf"

if [ ! -f /live.vars ]
then
	touch /live.vars
fi