Support multiple devices (both manually as well as automatically) and timeout option...
[live-initramfs-grml.git] / grml / 05mountpoints
1 #!/bin/sh
2
3 #set -e
4
5 # initramfs-tools header
6
7 PREREQ=""
8
9 prereqs()
10 {
11         echo "${PREREQ}"
12 }
13
14 case "${1}" in
15         prereqs)
16                 prereqs
17                 exit 0
18                 ;;
19 esac
20
21 # live-initramfs header
22
23 . /scripts/live-functions
24
25 log_begin_msg "Moving mount points"
26
27 # live-initramfs script
28
29 # Move to the new root filesystem so that programs there can get at it.
30 if [ ! -d /root/live/image ]
31 then
32         mkdir -p /root/live/image
33         mount -n --move /live/image /root/live/image
34 fi
35
36 MOUNTED_ON=$(grep /live/image /proc/mounts 2>/dev/null | cut -f 1 -d " ")
37 if [ -n "$MOUNTED_ON" ] ; then
38    echo "   -> Mounted live system on $MOUNTED_ON">/dev/console
39 fi
40
41 log_end_msg