Updated cloner3 to support installing images from a disk partition with an ext4 LABEL=
[bootimage-initfs.git] / etc / cloner3 / detect_label.sh
1 #!/bin/ash
2
3 . /etc/library.sh
4 . /etc/cloner3/include.sh
5 . /tmp/cmdline.dat
6
7 header "Trying to locate the srclabel '${_srclabel}' device"
8
9 msg -n "Mounting ${ANSI_BLUE}${i}${ANSI_DONE} on /mnt/media"
10 mount -t ext4 LABEL=${_srclabel} /mnt/media >> /tmp/stdout.log \ 
11         2>> /tmp/stderr.log
12
13 if [ "$?" = "0" ]
14 then
15         ok_msg
16         break
17 else
18         fatal_error "Can't mount device LABEL=${_srclabel}"
19 fi