Dropping snapshot functionality, superseeded by awesome custom mount persistence.
[live-boot-grml.git] / scripts / boot.sh
1 #!/bin/sh
2
3 # set -e
4
5 if [ -e /scripts/functions ]
6 then
7         # initramfs-tools specific (FIXME)
8         . /scripts/functions
9 fi
10
11 for _SCRIPT in /lib/live/boot/*
12 do
13         if [ -e "${_SCRIPT}" ]
14         then
15                 . ${_SCRIPT}
16         fi
17 done
18
19 export PATH="/root/usr/bin:/root/usr/sbin:/root/bin:/root/sbin:/usr/bin:/usr/sbin:/bin:/sbin"
20
21 echo "/root/lib" >> /etc/ld.so.conf
22 echo "/root/usr/lib" >> /etc/ld.so.conf
23
24 mountpoint="/live/image"
25 alt_mountpoint="/media"
26 LIVE_MEDIA_PATH="live"
27
28 HOSTNAME="host"
29
30 mkdir -p "${mountpoint}"
31 tried="/tmp/tried"
32
33 # Create /etc/mtab for debug purpose and future syncs
34 if [ ! -d /etc ]
35 then
36         mkdir /etc/
37 fi
38
39 if [ ! -f /etc/mtab ]
40 then
41         touch /etc/mtab
42 fi
43
44 if [ ! -x "/bin/fstype" ]
45 then
46         # klibc not in path -> not in initramfs
47         export PATH="${PATH}:/usr/lib/klibc/bin"
48 fi
49
50 # handle upgrade path from old udev (using udevinfo) to
51 # recent versions of udev (using udevadm info)
52 if [ -x /sbin/udevadm ]
53 then
54         udevinfo='/sbin/udevadm info'
55 else
56         udevinfo='udevinfo'
57 fi
58
59 old_root_overlay_label="live-rw"
60 old_home_overlay_label="home-rw"
61 custom_overlay_label="custom-ov"
62 persistence_list="live-persistence.conf"
63
64 if [ ! -f /live.vars ]
65 then
66         touch /live.vars
67 fi