2 #----------------------------------------------------
3 #shell used to prepare container struture, this script
4 #is called by the vzgot before any root pivot action.
5 #It is used on the firstboot to prepare all needed file.
6 #or restructure container.
8 #----------------------------------------------------
10 #vzgot.fistboot VE_name VE_pid Distrib domain node name ip_list [Base]
11 # VE_name is the container dir name
12 # Linux family (RedHat...)
13 # Domain is the container domainname
14 # Node is the container hostname
15 # IP_LIST is an ip list (ip,ip1,ip2,..) used
16 # to prepare container network
17 # base_dir is this application root directory
18 # (used for devel only).
19 #----------------------------------------------------
26 #----------------------------------------------------
27 if ! [ -f $BASE/etc/vzgot/vzgot_config ] ; then
28 echo "Missing vzgot config file"
29 exit 1 #trouble trouble
31 . $BASE/etc/vzgot/vzgot_config
33 #specific container configuration override (if needed)
34 if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config ] ; then
35 $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config
38 #====================================================
41 #setting linux family in configuration file
42 echo "$FLINUX" > $BASE/$VZLIB/vzdir/$CONTNAME/linux
46 $BASE/$VZLIB/shell/vzgot.fboot.redhat \
47 $CONTNAME $NODE $DOMAIN $LSTIP $BASE
50 $BASE/$VZLIB/shell/vzgot.fboot.debian \
51 $CONTNAME $NODE $DOMAIN $LSTIP $BASE
54 /bin/echo "<"$FLINUX"> not yet an implemented linux family"
58 #----------------------------------------------------
59 #setting the container status to "ON"
60 #used by /etc/init.d/vzgot when hot is booting
61 echo "BOOT=ON" > $BASE/$VZLIB/vzdir/$CONTNAME/status
62 #----------------------------------------------------