Updated cloner3 to support installing images from a disk partition with an ext4 LABEL=
[bootimage-initfs.git] / etc / cloner3 / startup.sh
1 #!/bin/ash
2
3 . /etc/library.sh
4 . /etc/cloner3/include.sh
5 . /etc/cloner3/cloner_server.sh
6
7 # first thing we do is bring up the network interface if we are not
8 # installing from a sourcepath
9 if [ "${_srcpath}" != "" ]
10 then
11         /etc/cloner3/detect_cd.sh
12 fi
13
14 if [ "${_srclabel}" != "" ]
15 then
16         /etc/cloner3/detect_label.sh
17 fi
18
19 /etc/cloner3/get_setup.sh
20 if [ $? != 0 ]; then
21         exit 1
22 fi
23
24
25 # if we are supposed to automatically format disks
26 if [ "${_manualdisk}" = "" ]
27 then
28         /etc/cloner3/prep_disks.sh
29         if [ $? != 0 ]; then
30                 exit 1
31         fi
32         /etc/cloner3/installer.sh
33         if [ $? != 0 ]; then
34                 exit 1
35         fi
36         
37         . /tmp/cmdline.dat
38         header "Cloner install finished"
39         server_clone_done "${_node}" "${_nextboot}"
40         
41         if [ "${_reboot}" != "" ]
42         then
43                 server_log "Rebooting machine" "${_node}"       
44                 header "Rebooting machine now"
45                 reboot
46                 exit 1
47         fi
48
49         echo -e "The cloner install has finished successfully.  You may now reboot"
50         echo -e "the machine.  If you would like to re-mount the destination filesystems"
51         echo -e "to make any changes manually please run ${ANSI_BLUE}/etc/cloner3/remount-fs.sh${ANSI_DONE}"
52         echo -e ""
53         echo -en "Press ${ANSI_BLUE}[ENTER]${ANSI_DONE} for a command prompt"
54         read PROMPT
55
56 else
57
58         header "Partition and format disks"
59         echo -e "You have selected to manually partition and format your hard disk drives"
60         echo -e "please do that now, and mount them under /cloner/mnt as they will be in"
61         echo -e "the installed OS.  When finished execute /etc/cloner3/installer.sh on the command"
62         echo -e "line to finish the installation of this system."
63
64         echo -en "Press ${ANSI_BLUE}[ENTER]${ANSI_DONE} for a command prompt"
65         read PROMPT
66 fi