From: Jean-Marc Pigeon Date: Sat, 6 Mar 2010 16:40:31 +0000 (-0500) Subject: Inserting VZGOT development tree within GIT X-Git-Tag: v0.84~1 X-Git-Url: http://ftp.safe.ca/?p=safe%2Fjmp%2Fvzgot;a=commitdiff_plain;h=c4b3b8f694c902b7adb2c9b5a871bcde7b2c826f Inserting VZGOT development tree within GIT --- c4b3b8f694c902b7adb2c9b5a871bcde7b2c826f diff --git a/Changes b/Changes new file mode 100644 index 0000000..7aaeb55 --- /dev/null +++ b/Changes @@ -0,0 +1,35 @@ + VZGOT Release and Changes logs + +#;---------------------------------------------------------------------- +#$Revision: 0.84.0.0 $, $Date: 2010/03/06 16:39:08 $ +# +#;---------------------------------------------------------------------- +$Revision: 0.84.0.0 $, $Date: 2010/03/06 16:39:08 $ +- Improvements + * git handling + +;---------------------------------------------------------------------- +$Revision: 0.83.0.7, Date: 2010/02/18 14:28:18 +- Bug Fix + * shell vzgot.create, changed etx4 to ext4 when + populating /etc/fstab with LVM partition data. + +;---------------------------------------------------------------------- +Revision: 0.83.0.0, Date: 2010/01/12 15:36:43 +- Improvements + * Better call to chkconfig within the rpm (%post) SPEC file. + * Able to start ubuntu-8.4 container type + * cgroup is used to limit container user priviledge + * LVM is used to make dedicated container root file system + +;---------------------------------------------------------------------- +Revision: 0.71.0.6, Date: 2010/01/04 16:11:33 +- Bug Fix + * In none debug flag, vzgot was not returning echo + from called shell + * Defining a 'FLINUX' env variable within shell script + vzgot.mksrvz to be pass to 'vzgot create' and used by + vzgot.fboot to prepare container with the right + linux family (RedHat,SUSE,...) structure + +;---------------------------------------------------------------------- diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..93c1631 --- /dev/null +++ b/Makefile @@ -0,0 +1,242 @@ +#-------------------------------------------------------------------- +#to make Mentor executable +#-------------------------------------------------------------------- +#variable checking +#devbase est fait sur le nom de dieux goth +#Odin,Gaus,Donar,Volla,Phol +ORIG?="montreal" +ifeq ("$(ORIG)","mercier") +export DEVBASE=odin +endif +ifeq ("$(ORIG)","longueuil") +export DEVBASE=gaus +endif +#defining devbase +DEVDIR=`(cd /home/safe ; pwd)`/safetst/$(DEVBASE) +#-------------------------------------------------------------------- +dev : fclean chkmake + @ $(MAKE) $(NCPU) -s fdebug + +devprod : fclean chkmake + @ $(MAKE) $(NCPU) -s fprod + +chkmake : Makefile.inc Makefile + @ $(MAKE) -s fclean + @ touch chkmake + +fclean : clean + @ for i in $(PRIVDIRS) ; \ + do \ + echo "Doing now \"$$i clean\"" ; \ + $(MAKE) -s -C $$i clean ; \ + done + @ rm -fr $(RPMDIR)/SOURCES/$(APLR)*.tgz \ + $(APPNAME)*.src.rpm + +fdebug : + @ $(MAKE) -s debug + @ for i in $(PRIVDIRS) ; \ + do \ + echo "Doing: $$i debug" ; \ + $(MAKE) -s -C $$i debug ; \ + done + +fprod : + @ $(MAKE) -s prod + @ for i in $(PRIVDIRS) ; \ + do \ + echo "Doing: $$i prod" ; \ + $(MAKE) -s -C $$i prod ; \ + done + +#-------------------------------------------------------------------- +#to test application localy +vzboot : dev + @ $(MAKE) ACTION="boot cont" vzgotry + +vzgotry : + - exec app/$(APPNAME) -b $(DEVDIR) -v -f -d9 $(ACTION) + +#-------------------------------------------------------------------- +#to save the current distribution +sauve : fclean + @ echo "starting RCS process" + @ support/sauver $(SRC) + @ for i in $(ALLDIRS) ; \ + do \ + $(MAKE) -s -C $$i $@ ; \ + done + @ echo "RCS process completed" +#-------------------------------------------------------------------- +#creation d'un band de test +devbase : + @ ( \ + if [ -z $(DEVBASE) ] ; then \ + echo "DEVBASE environment variable is missing" ; \ + else \ + echo "Starting to build devbase \"$(DEVBASE)\"" ;\ + $(MAKE) -s devil ; \ + fi \ + ) + +devil : + @ $(MAKE) -s fclean fdebug + @ echo "Creating \"$(DEVBASE)\" test executable"; + @ ( \ + if [ -d $(DEVDIR) ] ; then \ + rm -fr $(DEVDIR)/* ; \ + else \ + mkdir $(DEVDIR) ; \ + fi ; \ + ) + @ #creating basic prexisting system directory + @ mkdir -p \ + $(DEVDIR)/$(VZDIR)/cont/.oldroot \ + $(DEVDIR)/$(VZDIR)/cont/rootfs \ + $(DEVDIR)/usr/bin \ + $(DEVDIR)/var/tmp \ + $(DEVDIR)/var/lock/$(APPNAME) \ + $(DEVDIR)/tmp + @ echo "\"$(DEVBASE)\" now ready" + +#-------------------------------------------------------------------- +#to make a full distribution + +distrib : fclean rpm + $(MAKE) dorpm_distrib +#-------------------------------------------------------------------- +#to test application +xtest : rpm + @ ssh -q -Y -t $(XTSTSYS) sudo \ + rm -f ~safe/rpmbuild/RPMS/i586/$(APPNAME)*.i586.rpm + @ ssh -q -Y -t $(XTSTSYS) sudo \ + rm -f ~safe/$(APPNAME)*.src.rpm + @ scp -q $(APPNAME)*.src.rpm $(XTSTSYS): + @ ssh -Y -t $(XTSTSYS) \ + "rpmbuild --rebuild $(APPNAME)*.src.rpm" + @ ssh -Y -t $(XTSTSYS) sudo \ + rpm -Uhv ~safe/rpmbuild/RPMS/i586/$(APPNAME)*.i586.rpm + +test : binary + @ ssh $(TSTSYS).safe.ca \ + "rm -fr $(APPNAME)-*.x86_64.rpm" + @ scp -q \ + $(RPMDIR)/RPMS/x86_64/$(APPNAME)-*.x86_64.rpm \ + $(TSTSYS).safe.ca: + @ ssh -Y -t $(TSTSYS).safe.ca sudo \ + rpm -Uhv ~safe/$(APPNAME)-*.x86_64.rpm + +binary : rpm + @ echo "Making RPM binary" + @ rm -fr $(RPMDIR)/RPMS/x86_64/$(APPNAME)-*.x86_64.rpm + @ rm -fr $(APPNAME)-*.x86_64.rpm + @ rpm --quiet -Uhv $(APLR)*.src.rpm > /dev/null + @ rpmbuild \ + --ba \ + --quiet \ + --rebuild \ + $(RPMDIR)/SPECS/$(APPNAME).spec + @ cp $(RPMDIR)/RPMS/x86_64/$(APPNAME)-*.x86_64.rpm . + @ echo "RPM binary completed" + + +rpmlint : binary + @ rpmlint $(APPNAME)-*.x86_64.rpm + +release : binary + @ ssh $(FTPSITE).safe.ca \ + mkdir -p /var/ftp/pub/linux/vzgot/archives + @ ssh $(FTPSITE).safe.ca \ + mv /var/ftp/pub/linux/vzgot/*.rpm \ + /var/ftp/pub/linux/vzgot/archives + @ scp -p support/{README,QUICK-START} \ + $(APPNAME)-*.rpm \ + $(FTPSITE).safe.ca:/var/ftp/pub/linux/vzgot + @ grep -v '^[#.*]' Changes | \ + ssh $(FTPSITE).safe.ca \ + "cat - > /var/ftp/pub/linux/vzgot/Changes" +#-------------------------------------------------------------------- +#to make the RPM SRC file +rpm : + @ echo "Making RPM src" + @ $(MAKE) -s vztar + @ rm -fr \ + $(RPMDIR)/SOURCES/$(APLR)*.tgz \ + $(APPNAME)*.src.rpm + @ mv $(APLR).tgz $(RPMDIR)/SOURCES + @ rpmbuild -bs \ + --quiet \ + --define "_topdir /home/safe/RPM" \ + support/$(APPNAME).spec > /dev/null 2>&1 + @ mv $(RPMDIR)/SRPMS/$(APLR)*.src.rpm . + @ echo "RPM src completed" + +vztar : + @ rm -fr $(APLR).tgz + @ mkdir -p \ + $(APLR)/conf \ + $(APLR)/lib \ + $(APLR)/app \ + $(APLR)/cgroup.d \ + $(APLR)/etc \ + $(APLR)/etc/sysconfig \ + $(APLR)/etc/snmp \ + $(APLR)/shell + @ #copying version, build_date and info file + @ date > $(APLR)/$(APLR).build_date + @ #adding RPM data + @ cp -ap RPM $(APLR) + @ #adding group information + @ cp -ap cgroup.d/devices.* $(APLR)/cgroup.d + @ #adding application sources + @ cp -a lib/{*.c,*.h} $(APLR)/lib + @ cp -a app/*.c $(APLR)/app + @ cp -a shell/vzgot.* $(APLR)/shell + @ #adding configuration file + @ cp -a support/vzgot_config $(APLR)/conf + @ cp -a support/vzgot_list $(APLR)/conf + @ cp -a support/redhat_init.sh $(APLR)/conf + @ cp -a support/{README,QUICK-START} $(APLR) + @ grep -v '^[#.*]' Changes > $(APLR)/Changes + @ cp -a etc/{users,groups,sudoers} $(APLR)/etc + @ cp -a etc/{resolv.conf,shadow} $(APLR)/etc + @ cp -a etc/iptables $(APLR)/etc/sysconfig + @ cp -a etc/snmpd.conf $(APLR)/etc/snmp + @ #adding construction file + @ cp -a Makefile.inc $(APLR)/Makefile + @ @ cp -a lib/Makefile.inc $(APLR)/lib/Makefile + @ @ cp -a app/Makefile.inc $(APLR)/app/Makefile + @ tar zcf $(APLR).tgz $(APLR) + @ rm -fr $(APLR) + +#-------------------------------------------------------------------- +togit : fclean + @ git add . + @ git clean -f -q + @ echo "Ready for \"git commit -a\"" + +#-------------------------------------------------------------------- +SRC = \ + Changes \ + Makefile.inc + +ALLDIRS = \ + $(SUBDIRS) \ + etc cgroup.d shell support + + +PROG= $(APPNAME) + +VZDIR=/var/lib/vzgot +#-------------------------------------------------------------------- +include ./Makefile.inc +include /etc/saferepo/Makefile.dorpm +#-------------------------------------------------------------------- +#rpm definitions +RPMDIR = ~/RPM +TSTSYS = Sorel +XTSTSYS = 192.219.254.58 +FTPSITE = ftploc +#==================================================================== +.PHONY: sauve binary rpm rpmlint chkmake togit +#-------------------------------------------------------------------- diff --git a/Makefile.inc b/Makefile.inc new file mode 100644 index 0000000..5d80a66 --- /dev/null +++ b/Makefile.inc @@ -0,0 +1,71 @@ +#-------------------------------------------------------------------- +#To make a debugging executable +prod \ +debug : + @ for i in $(SUBDIRS) ; \ + do \ + echo "Doing: $$i $@"; \ + $(MAKE) -C $$i $@ ; \ + RETVAL=$$? ; \ + if [ $$RETVAL != 0 ] ; then \ + exit $$RETVAL ; \ + fi ; \ + done + +#To clean distribution +clean : + @ for i in $(SUBDIRS) ; \ + do \ + echo "Doing now \"$$i $@\"" ; \ + $(MAKE) -s -C $$i $@ ; \ + done + @ - rm -fr bin + +#-------------------------------------------------------------------- +#installing application +install : + @ install -d $(DESTDIR)/usr/sbin/ + @ install -d $(DESTDIR)/var/lock/$(APPNAME) + @ #adding executable + @ install app/vzgot $(DESTDIR)/usr/sbin + @ mv shell/vzgot.mksrvz $(DESTDIR)/usr/sbin/ + @ mv shell/vzgot.redoall $(DESTDIR)/usr/sbin/ + @ #adding init file + @ install -d $(DESTDIR)/etc/rc.d/init.d + @ cp -ap conf/redhat_init.sh $(DESTDIR)/etc/rc.d/init.d/vzgot + @ #adding configuration file + @ install -d $(DESTDIR)/etc/$(APPNAME) + @ install -m 0644 conf/vzgot_config $(DESTDIR)/etc/$(APPNAME) + @ install -m 0644 conf/vzgot_list $(DESTDIR)/etc/$(APPNAME) + @ install -d $(DESTDIR)/var/lib/$(APPNAME) + @ cp -ap etc $(DESTDIR)/var/lib/$(APPNAME) + @ install -d $(DESTDIR)/var/lib/$(APPNAME)/etc/ssh + @ install -d $(DESTDIR)/var/lib/$(APPNAME)/etc/sysconfig + @ install -d $(DESTDIR)/var/lib/$(APPNAME)/home + @ cp -ap cgroup.d $(DESTDIR)/var/lib/$(APPNAME) + @ #adding template directory + @ install -d $(DESTDIR)/var/lib/$(APPNAME)/vztemplate + @ #adding special distribution RPM + @ cp -ap RPM $(DESTDIR)/var/lib/$(APPNAME) + @ install -d $(DESTDIR)/var/lib/$(APPNAME)/vzdir + @ #adding application shell script + @ install -d $(DESTDIR)/var/lib/$(APPNAME)/shell + @ install shell/vzgot.* $(DESTDIR)/var/lib/$(APPNAME)/shell + +#-------------------------------------------------------------------- +SUBDIRS= \ + lib app + +#=================================================================== +#all support information +.PHONY: clean +#-------------------------------------------------------------------- +#version management +APPNAME=vzgot +REVISION="$Revision: 0.84.0.0 $ " +DATE="$Date: 2010/03/06 16:39:08 $" +VERS=`echo $(REVISION) | cut -d' ' -f 2 | cut -d'.' -f1,2` +REL=`echo $(REVISION) | cut -d' ' -f 2 | cut -d'.' -f4` +SUBVERS=`echo $(DATE) | cut -d' ' -f2 | tr -d '/'` +APLR=$(APPNAME)-$(VERS).$(REL) +#-------------------------------------------------------------------- diff --git a/RCS/Changes,v b/RCS/Changes,v new file mode 100644 index 0000000..f83d202 --- /dev/null +++ b/RCS/Changes,v @@ -0,0 +1,173 @@ +head 0.84; +access; +symbols; +locks + jmp:0.84.0.0; strict; +comment @# @; + + +0.84 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.84.0.0; +next 0.83; + +0.83 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.83.0.0; +next ; + +0.83.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next 0.83.0.1; + +0.83.0.1 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + +0.84.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + + +desc +@ VZGOT Release and Changes logs + +#;---------------------------------------------------------------------- +#$Revision: 0.84.0.0 $, $Date: 2010/03/06 16:38:31 $ +# +#;---------------------------------------------------------------------- +$Revision: 0.84.0.0 $, $Date: 2010/03/06 16:38:31 $ +- Improvements + * git handling + +;---------------------------------------------------------------------- +$Revision: 0.83.0.7, Date: 2010/02/18 14:28:18 +- Bug Fix + * shell vzgot.create, changed etx4 to ext4 when + populating /etc/fstab with LVM partition data. + +;---------------------------------------------------------------------- +Revision: 0.83.0.0, Date: 2010/01/12 15:36:43 +- Improvements + * Better call to chkconfig within the rpm (%post) SPEC file. + * Able to start ubuntu-8.4 container type + * cgroup is used to limit container user priviledge + * LVM is used to make dedicated container root file system + +;---------------------------------------------------------------------- +Revision: 0.71.0.6, Date: 2010/01/04 16:11:33 +- Bug Fix + * In none debug flag, vzgot was not returning echo + from called shell + * Defining a 'FLINUX' env variable within shell script + vzgot.mksrvz to be pass to 'vzgot create' and used by + vzgot.fboot to prepare container with the right + linux family (RedHat,SUSE,...) structure + +;---------------------------------------------------------------------- +@ + + +0.84 +log +@upgrade version +@ +text +@ VZGOT Release and Changes logs + +#;---------------------------------------------------------------------- +#$Revision: 0.83.0.1 $, $Date: 2010/03/06 16:39:08 $ +# +#;---------------------------------------------------------------------- +$Revision: 0.83.0.1 $, $Date: 2010/03/06 16:39:08 $ +- Improvements + * git handling + +;---------------------------------------------------------------------- +$Revision: 0.83.0.7, Date: 2010/02/18 14:28:18 +- Bug Fix + * shell vzgot.create, changed etx4 to ext4 when + populating /etc/fstab with LVM partition data. + +;---------------------------------------------------------------------- +Revision: 0.83.0.0, Date: 2010/01/12 15:36:43 +- Improvements + * Better call to chkconfig within the rpm (%post) SPEC file. + * Able to start ubuntu-8.4 container type + * cgroup is used to limit container user priviledge + * LVM is used to make dedicated container root file system + +;---------------------------------------------------------------------- +Revision: 0.71.0.6, Date: 2010/01/04 16:11:33 +- Bug Fix + * In none debug flag, vzgot was not returning echo + from called shell + * Defining a 'FLINUX' env variable within shell script + vzgot.mksrvz to be pass to 'vzgot create' and used by + vzgot.fboot to prepare container with the right + linux family (RedHat,SUSE,...) structure + +;---------------------------------------------------------------------- +@ + + +0.84.0.0 +log +@Ratrapage numero de Version +@ +text +@d4 1 +a4 1 +#$Revision: 0.84 $, $Date: 2010/03/06 16:39:08 $ +d7 1 +a7 1 +$Revision: 0.84 $, $Date: 2010/03/06 16:39:08 $ +@ + + +0.83 +log +@Creation +#================================================================================= +@ +text +@d4 1 +a4 1 +#$Revision: 0.84.0.0 $, $Date: 2010/03/06 16:38:31 $ +d7 1 +a7 1 +$Revision: 0.84.0.0 $, $Date: 2010/03/06 16:38:31 $ +@ + + +0.83.0.0 +log +@Ratrapage numero de Version +@ +text +@d4 1 +a4 1 +#$Revision: 0.83 $, $Date: 2010/03/06 16:39:08 $ +d7 1 +a7 1 +$Revision: 0.83 $, $Date: 2010/03/06 16:39:08 $ +@ + + +0.83.0.1 +log +@Mise en place su GIT +@ +text +@d4 1 +a4 1 +#$Revision: 0.83.0.0 $, $Date: 2010/03/06 16:39:08 $ +d7 1 +a7 1 +$Revision: 0.83.0.0 $, $Date: 2010/03/06 16:39:08 $ +@ diff --git a/RCS/Makefile.inc,v b/RCS/Makefile.inc,v new file mode 100644 index 0000000..e87b18d --- /dev/null +++ b/RCS/Makefile.inc,v @@ -0,0 +1,235 @@ +head 0.84; +access; +symbols; +locks + jmp:0.84.0.0; strict; +comment @# @; + + +0.84 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.84.0.0; +next 0.83; + +0.83 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.83.0.0; +next ; + +0.83.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next 0.83.0.1; + +0.83.0.1 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + +0.84.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + + +desc +@#-------------------------------------------------------------------- +#To make a debugging executable +prod \ +debug : + @@ for i in $(SUBDIRS) ; \ + do \ + echo "Doing: $$i $@@"; \ + $(MAKE) -C $$i $@@ ; \ + RETVAL=$$? ; \ + if [ $$RETVAL != 0 ] ; then \ + exit $$RETVAL ; \ + fi ; \ + done + +#To clean distribution +clean : + @@ for i in $(SUBDIRS) ; \ + do \ + echo "Doing now \"$$i $@@\"" ; \ + $(MAKE) -s -C $$i $@@ ; \ + done + @@ - rm -fr bin + +#-------------------------------------------------------------------- +#installing application +install : + @@ install -d $(DESTDIR)/usr/sbin/ + @@ install -d $(DESTDIR)/var/lock/$(APPNAME) + @@ #adding executable + @@ install app/vzgot $(DESTDIR)/usr/sbin + @@ mv shell/vzgot.mksrvz $(DESTDIR)/usr/sbin/ + @@ mv shell/vzgot.redoall $(DESTDIR)/usr/sbin/ + @@ #adding init file + @@ install -d $(DESTDIR)/etc/rc.d/init.d + @@ cp -ap conf/redhat_init.sh $(DESTDIR)/etc/rc.d/init.d/vzgot + @@ #adding configuration file + @@ install -d $(DESTDIR)/etc/$(APPNAME) + @@ install -m 0644 conf/vzgot_config $(DESTDIR)/etc/$(APPNAME) + @@ install -m 0644 conf/vzgot_list $(DESTDIR)/etc/$(APPNAME) + @@ install -d $(DESTDIR)/var/lib/$(APPNAME) + @@ cp -ap etc $(DESTDIR)/var/lib/$(APPNAME) + @@ install -d $(DESTDIR)/var/lib/$(APPNAME)/etc/ssh + @@ install -d $(DESTDIR)/var/lib/$(APPNAME)/etc/sysconfig + @@ install -d $(DESTDIR)/var/lib/$(APPNAME)/home + @@ cp -ap cgroup.d $(DESTDIR)/var/lib/$(APPNAME) + @@ #adding template directory + @@ install -d $(DESTDIR)/var/lib/$(APPNAME)/vztemplate + @@ #adding special distribution RPM + @@ cp -ap RPM $(DESTDIR)/var/lib/$(APPNAME) + @@ install -d $(DESTDIR)/var/lib/$(APPNAME)/vzdir + @@ #adding application shell script + @@ install -d $(DESTDIR)/var/lib/$(APPNAME)/shell + @@ install shell/vzgot.* $(DESTDIR)/var/lib/$(APPNAME)/shell + +#-------------------------------------------------------------------- +SUBDIRS= \ + lib app + +#=================================================================== +#all support information +.PHONY: clean +#-------------------------------------------------------------------- +#version management +APPNAME=vzgot +REVISION="$Revision: 0.84.0.0 $ " +DATE="$Date: 2010/03/06 16:38:31 $" +VERS=`echo $(REVISION) | cut -d' ' -f 2 | cut -d'.' -f1,2` +REL=`echo $(REVISION) | cut -d' ' -f 2 | cut -d'.' -f4` +SUBVERS=`echo $(DATE) | cut -d' ' -f2 | tr -d '/'` +APLR=$(APPNAME)-$(VERS).$(REL) +#-------------------------------------------------------------------- +@ + + +0.84 +log +@upgrade version +@ +text +@#-------------------------------------------------------------------- +#To make a debugging executable +prod \ +debug : + @@ for i in $(SUBDIRS) ; \ + do \ + echo "Doing: $$i $@@"; \ + $(MAKE) -C $$i $@@ ; \ + RETVAL=$$? ; \ + if [ $$RETVAL != 0 ] ; then \ + exit $$RETVAL ; \ + fi ; \ + done + +#To clean distribution +clean : + @@ for i in $(SUBDIRS) ; \ + do \ + echo "Doing now \"$$i $@@\"" ; \ + $(MAKE) -s -C $$i $@@ ; \ + done + @@ - rm -fr bin + +#-------------------------------------------------------------------- +#installing application +install : + @@ install -d $(DESTDIR)/usr/sbin/ + @@ install -d $(DESTDIR)/var/lock/$(APPNAME) + @@ #adding executable + @@ install app/vzgot $(DESTDIR)/usr/sbin + @@ mv shell/vzgot.mksrvz $(DESTDIR)/usr/sbin/ + @@ mv shell/vzgot.redoall $(DESTDIR)/usr/sbin/ + @@ #adding init file + @@ install -d $(DESTDIR)/etc/rc.d/init.d + @@ cp -ap conf/redhat_init.sh $(DESTDIR)/etc/rc.d/init.d/vzgot + @@ #adding configuration file + @@ install -d $(DESTDIR)/etc/$(APPNAME) + @@ install -m 0644 conf/vzgot_config $(DESTDIR)/etc/$(APPNAME) + @@ install -m 0644 conf/vzgot_list $(DESTDIR)/etc/$(APPNAME) + @@ install -d $(DESTDIR)/var/lib/$(APPNAME) + @@ cp -ap etc $(DESTDIR)/var/lib/$(APPNAME) + @@ install -d $(DESTDIR)/var/lib/$(APPNAME)/etc/ssh + @@ install -d $(DESTDIR)/var/lib/$(APPNAME)/etc/sysconfig + @@ install -d $(DESTDIR)/var/lib/$(APPNAME)/home + @@ cp -ap cgroup.d $(DESTDIR)/var/lib/$(APPNAME) + @@ #adding template directory + @@ install -d $(DESTDIR)/var/lib/$(APPNAME)/vztemplate + @@ #adding special distribution RPM + @@ cp -ap RPM $(DESTDIR)/var/lib/$(APPNAME) + @@ install -d $(DESTDIR)/var/lib/$(APPNAME)/vzdir + @@ #adding application shell script + @@ install -d $(DESTDIR)/var/lib/$(APPNAME)/shell + @@ install shell/vzgot.* $(DESTDIR)/var/lib/$(APPNAME)/shell + +#-------------------------------------------------------------------- +SUBDIRS= \ + lib app + +#=================================================================== +#all support information +.PHONY: clean +#-------------------------------------------------------------------- +#version management +APPNAME=vzgot +REVISION="$Revision: 0.83.0.1 $ " +DATE="$Date: 2010/03/06 16:39:08 $" +VERS=`echo $(REVISION) | cut -d' ' -f 2 | cut -d'.' -f1,2` +REL=`echo $(REVISION) | cut -d' ' -f 2 | cut -d'.' -f4` +SUBVERS=`echo $(DATE) | cut -d' ' -f2 | tr -d '/'` +APLR=$(APPNAME)-$(VERS).$(REL) +#-------------------------------------------------------------------- +@ + + +0.84.0.0 +log +@Ratrapage numero de Version +@ +text +@d65 1 +a65 1 +REVISION="$Revision: 0.84 $ " +@ + + +0.83 +log +@Creation +#================================================================================= +@ +text +@d65 2 +a66 2 +REVISION="$Revision: 0.84.0.0 $ " +DATE="$Date: 2010/03/06 16:38:31 $" +@ + + +0.83.0.0 +log +@Ratrapage numero de Version +@ +text +@d65 2 +a66 2 +REVISION="$Revision: 0.83 $ " +DATE="$Date: 2010/03/06 16:39:08 $" +@ + + +0.83.0.1 +log +@Mise en place su GIT +@ +text +@d65 1 +a65 1 +REVISION="$Revision: 0.83.0.0 $ " +@ diff --git a/RPM/RPMS/i386/el4.7/iputils-20020927-22.el4.i386.rpm b/RPM/RPMS/i386/el4.7/iputils-20020927-22.el4.i386.rpm new file mode 100644 index 0000000..ad75d80 Binary files /dev/null and b/RPM/RPMS/i386/el4.7/iputils-20020927-22.el4.i386.rpm differ diff --git a/RPM/RPMS/i386/rh7.3/procps-2.0.7-30.i386.rpm b/RPM/RPMS/i386/rh7.3/procps-2.0.7-30.i386.rpm new file mode 100644 index 0000000..6fef142 Binary files /dev/null and b/RPM/RPMS/i386/rh7.3/procps-2.0.7-30.i386.rpm differ diff --git a/RPM/RPMS/i386/rh8.0/procps-2.0.7-35.i386.rpm b/RPM/RPMS/i386/rh8.0/procps-2.0.7-35.i386.rpm new file mode 100644 index 0000000..087d1d8 Binary files /dev/null and b/RPM/RPMS/i386/rh8.0/procps-2.0.7-35.i386.rpm differ diff --git a/RPM/RPMS/i386/rh9/procps-2.0.11-36.i386.rpm b/RPM/RPMS/i386/rh9/procps-2.0.11-36.i386.rpm new file mode 100644 index 0000000..4eb36ae Binary files /dev/null and b/RPM/RPMS/i386/rh9/procps-2.0.11-36.i386.rpm differ diff --git a/RPM/RPMS/x86_64/el4.7/iputils-20020927-22.el4.x86_64.rpm b/RPM/RPMS/x86_64/el4.7/iputils-20020927-22.el4.x86_64.rpm new file mode 100644 index 0000000..50bdf1c Binary files /dev/null and b/RPM/RPMS/x86_64/el4.7/iputils-20020927-22.el4.x86_64.rpm differ diff --git a/RPM/SRPMS/el4.7/iputils-20020927-22.el4.src.rpm b/RPM/SRPMS/el4.7/iputils-20020927-22.el4.src.rpm new file mode 100644 index 0000000..0cd4b32 Binary files /dev/null and b/RPM/SRPMS/el4.7/iputils-20020927-22.el4.src.rpm differ diff --git a/RPM/SRPMS/rh7.3/procps-2.0.7-30.src.rpm b/RPM/SRPMS/rh7.3/procps-2.0.7-30.src.rpm new file mode 100644 index 0000000..7ffe11a Binary files /dev/null and b/RPM/SRPMS/rh7.3/procps-2.0.7-30.src.rpm differ diff --git a/RPM/SRPMS/rh8.0/procps-2.0.7-35.src.rpm b/RPM/SRPMS/rh8.0/procps-2.0.7-35.src.rpm new file mode 100644 index 0000000..30b301a Binary files /dev/null and b/RPM/SRPMS/rh8.0/procps-2.0.7-35.src.rpm differ diff --git a/RPM/SRPMS/rh9/procps-2.0.11-36.src.rpm b/RPM/SRPMS/rh9/procps-2.0.11-36.src.rpm new file mode 100644 index 0000000..6e44476 Binary files /dev/null and b/RPM/SRPMS/rh9/procps-2.0.11-36.src.rpm differ diff --git a/app/Makefile b/app/Makefile new file mode 100644 index 0000000..2cbe3a7 --- /dev/null +++ b/app/Makefile @@ -0,0 +1,13 @@ +#-------------------------------------------------------------------- +sauve : + @ echo doing RCS on $(LOCDIR) + ../support/sauver $(SRC) +#-------------------------------------------------------------------- +#Sources contents +SRC= \ + Makefile + +LOCDIR= app +#-------------------------------------------------------------------- +include Makefile.inc +#-------------------------------------------------------------------- diff --git a/app/Makefile.inc b/app/Makefile.inc new file mode 100644 index 0000000..c6bd73f --- /dev/null +++ b/app/Makefile.inc @@ -0,0 +1,44 @@ +#-------------------------------------------------------------------- +#to compile opensrc clement application +#-------------------------------------------------------------------- +debug : + @ $(MAKE) OPTIME="-g" DEBUG="-DDEBUG" exe + +prod : + @ $(MAKE) OPTIME="-g3" exe + +exe : + @ $(MAKE) $(EXE) + +clean : + @ - rm -fr *.o $(EXE) *~ + +#-------------------------------------------------------------------- +#Executable file to do +EXE= \ + vzgot + +OBJS= \ + vzgot.o + +VZLIB= ../lib/vzlb.a +#-------------------------------------------------------------------- +#dependencies + +$(EXE) : $(OBJS) $(VZLIB) + @ $(LD) $(LDFLAGS) -o $@ $@.o $(LIBS) +#-------------------------------------------------------------------- +vzgot.o : \ + ../lib/lowtyp.h \ + ../lib/dbgmem.h \ + ../lib/subprc.h \ + ../lib/unilck.h ../lib/unicnt.h \ + vzgot.c + +#-------------------------------------------------------------------- +#compiler and loader options +CC=gcc $(OPTIME) $(DEBUG) +LD=$(CC) +CFLAGS=-I ../lib -std=gnu99 -pedantic -D_GNU_SOURCE -Wall -Wshadow +LIBS=$(VZLIB) +#-------------------------------------------------------------------- diff --git a/app/RCS/Makefile,v b/app/RCS/Makefile,v new file mode 100644 index 0000000..dbcaaf8 --- /dev/null +++ b/app/RCS/Makefile,v @@ -0,0 +1,105 @@ +head 0.84; +access; +symbols; +locks + jmp:0.84.0.0; strict; +comment @# @; + + +0.84 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.84.0.0; +next 0.83; + +0.83 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.83.0.0; +next ; + +0.83.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next 0.83.0.1; + +0.83.0.1 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + +0.84.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + + +desc +@#-------------------------------------------------------------------- +sauve : + @@ echo doing RCS on $(LOCDIR) + ../support/sauver $(SRC) +#-------------------------------------------------------------------- +#Sources contents +SRC= \ + Makefile + +LOCDIR= app +#-------------------------------------------------------------------- +include Makefile.inc +#-------------------------------------------------------------------- +@ + + +0.84 +log +@upgrade version +@ +text +@#-------------------------------------------------------------------- +sauve : + @@ echo doing RCS on $(LOCDIR) + ../support/sauver $(SRC) +#-------------------------------------------------------------------- +#Sources contents +SRC= \ + Makefile + +LOCDIR= app +#-------------------------------------------------------------------- +include Makefile.inc +#-------------------------------------------------------------------- +@ + + +0.84.0.0 +log +@Ratrapage numero de Version +@ +text +@@ + + +0.83 +log +@Creation +#================================================================================= +@ +text +@@ + + +0.83.0.0 +log +@Ratrapage numero de Version +@ +text +@@ + + +0.83.0.1 +log +@Mise en place su GIT +@ +text +@@ diff --git a/app/vzgot.c b/app/vzgot.c new file mode 100644 index 0000000..c563f52 --- /dev/null +++ b/app/vzgot.c @@ -0,0 +1,787 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* VZBOOT */ +/* Its purpose its too boot container */ +/* process and wait for process completion */ +/* or a SIGTERM signal, to initiate the */ +/* container shutdown. */ +/* */ +/************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "lowtyp.h" +#include "dbgmem.h" +#include "subprc.h" +#include "subapl.h" +#include "unilck.h" +#include "unicnt.h" + +#define APPNAME "vzgot" +#define VZOPEN "vzgot.open" /*preparing VZ */ +#define VZCLOSE "vzgot.close" /*stopping VZ */ +#define VZSTART "vzgot.start" /*container init*/ +#define VZFBOOT "vzgot.fboot" /*container boot*/ +#define VZCREAT "vzgot.create" /*make container*/ +#define VZDEST "vzgot.destroy" /*undo container*/ + +#define FBOOT "firstboot" /*firstboot rqst*/ + +/*argument structure */ +typedef struct { + pid_t mspid; /*vzgot master PID */ + char *arch; /*container architecture*/ + int argc; /*number of argument */ + char **argv; /*argument list */ + }ARGTYP; +/* + +*/ +/************************************************/ +/* */ +/* Procedure to display the program usage */ +/* */ +/************************************************/ +static void usage() + +{ +(void) fprintf(stderr,"%s Version %s\n",appname,apl_getvers()); +(void) fprintf(stderr,"usage: %s " + "[-b base] " + "[-d debug] " + "[-f ] " + "[-h ] " + "[-v ] " + "action_word " + "container_name [starter]\n",appname); +(void) fprintf(stderr,"\t\t-b base : application working directory\n"); +(void) fprintf(stderr,"\t\t-d debug : debug level\n"); +(void) fprintf(stderr,"\t\t-f : foreground\n"); +(void) fprintf(stderr,"\t\t-h : display usage\n"); +(void) fprintf(stderr,"\t\t-v : verbose debug\n"); +(void) fprintf(stderr,"actionword : boot|shutdown|firstboot|create|destroy,\n"); +(void) fprintf(stderr,"container_name : container name to do action to\n"); +(void) fprintf(stderr,"[starter] : program to start (default=\"/bin/init\")\n"); +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to display the firstboot usage*/ +/* */ +/************************************************/ +static void fbusage() + +{ +(void) fprintf(stderr,"%s: %s Version %s\n",appname,FBOOT,apl_getvers()); +(void) fprintf(stderr,"usage: %s " + "[-D distname] " + "[-d domain] " + "[-i IPNUM,[IPALIAS,...]] " + "[-h ] " + "[-n nodename] " + "container_name [starter]\n",FBOOT); +(void) fprintf(stderr,"\t\t-l distname: container linux distribution\n"); +(void) fprintf(stderr,"\t\t : (default RedHat)\n"); +(void) fprintf(stderr,"\t\t-d domain : container domainmame\n"); +(void) fprintf(stderr,"\t\t-h : display firstboot usage\n"); +(void) fprintf(stderr,"\t\t-b IPNUM : container ipnum\n"); +(void) fprintf(stderr,"\t\t-n nodename: container node name\n"); +(void) fprintf(stderr,"container_name : container name to initialize\n"); +(void) fprintf(stderr,"[starter] : program to start\n"); +(void) fprintf(stderr,"\t\t : (default=\"/bin/init\")\n"); +} +/* +^L +*/ +/************************************************/ +/* */ +/* procedure to set the system architecture*/ +/* */ +/************************************************/ +static int setarch(char *arch) + +{ +static struct { + const char *arch; + u_long persona; + }pers[]={ + {"i386",PER_LINUX32}, + {"i686",PER_LINUX32}, + {"x86_64",PER_LINUX}, + {(const char *)0,PER_LINUX} + }; +int status; +int i; + +status=-1; +errno=EINVAL; +for (i=0;pers[i].arch!=(const char *)0;i++) { + if (strcmp(pers[i].arch,arch)==0) { + status=personality(pers[i].persona); + break; + } + } +return status; +} + +/* +^L +*/ +/************************************************/ +/* */ +/* procedure to boot a container */ +/* */ +/************************************************/ +static int doboot(void *args) + +{ +static int todrop[]={ /*capability to drop */ + CAP_SYS_BOOT, + CAP_SYS_TIME + }; + +#define SBININIT "/sbin/init" +ARGTYP *parms; +int status; +int foreground; +int phase; +int proceed; + +/*SIGCONT received */ +/*FIRST give time to master to send ITS SIGSTOP */ +parms=(ARGTYP *)args; +status=0; +foreground=true; +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : /*give time to master */ + (void) sleep(1); /*to send SIGSTOP */ + break; /*SIGCONT received */ + case 1 : /*lets protect host */ + if (todrop!=(int *)0) { /*always */ + int i; + + for (i=0;i)", + appname,parms->argv[0],i,todrop[i],strerror(errno)); + status=phase; + phase=999; /*trouble trouble */ + } + } + } + break; /*SIGCONT received */ + case 2 : /*doing preliminary init*/ + if ((status=cnt_initscript(VZSTART,"%s %d %s",parms->argv[0],parms->mspid,base))!=0) { + (void) apl_alert(0,"%s, container %s unable to init itself (return %d)", + appname,parms->argv[0],status); + status=phase; + phase=999; /*trouble trouble */ + } + break; + case 3 : /*doing root pivot */ + if (parms->argc==0) + foreground=false; + if (cnt_pivot(foreground,parms->argv[0])==false) { + (void) apl_alert(0,"%s, container %s unable to pivot itself (aborting)", + appname,parms->argv[0]); + status=phase; + phase=999; /*trouble trouble */ + } + break; + case 4 : /*adjusting arch */ + if (setarch(parms->arch)<0) { + (void) apl_alert(0,"%s, container %s unable to set architecture to <%s> (error=<%s>)", + appname,parms->argv[0],parms->arch,strerror(errno)); + status=phase; + phase=999; /*trouble trouble */ + } + break; + case 5 : /*starting master jobs */ + parms->argc--; + parms->argv++; + if (parms->argc==0) /*daemon start */ + (void) execl(SBININIT,SBININIT,(char *)0); + else + (void) execv(parms->argv[0],parms->argv); + (void) apl_alert(0,"%s, container %s unable to start exec (errro=<%s>)", + appname,parms->argv[-1],strerror(errno)); + status=phase; /*trouble with exec! */ + break; + default : /*SAFE guard */ + proceed=false; + break; + } + phase++; + } +(void) sleep(1); /*lets relax */ +(void) exit(status); +} +/* +^L +*/ +/************************************************/ +/* */ +/* procedure to stop a container */ +/* */ +/************************************************/ +static int shutdown(int argc,char *argv[]) + +{ +int status; +pid_t cntpid; +int phase; +int proceed; + +status=1; +cntpid=(pid_t)0; +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : /*getting container pid */ + if ((cntpid=cnt_getclonepid(argv[0]))==(pid_t)0) { + (void) fprintf(stderr,"Shutdown is unable to find container <%s> " + "main pid\n",argv[0]); + phase=999; /*trouble trouble */ + } + break; + case 1 : /*sending SIGINT */ + if (kill(cntpid,SIGINT)<0) { + (void) fprintf(stderr,"Shutdown is send signal INT to container " + "<%s> main pid (error=<%s>)\n", + argv[0],strerror(errno)); + (void) cnt_rmclonepid(argv[0]); + phase=999; /*trouble trouble */ + } + break; + case 2 : /*waiting a little bit */ + (void) sleep(1); /*container stop */ + break; + case 3 : /*waiting full stop */ + if (cntpid!=(pid_t)1) { /*always */ + char *cmd; + int i; + + (void) asprintf(&cmd," ps --ppid %d | wc -l",cntpid); + for (i=0;i<15;i++) { + FILE *fichier; + int remaining; + + remaining=0; + if ((fichier=popen(cmd,"r"))==(FILE *)0) { + (void) apl_alert(0,"%s, shutdown pipe <%s> unable to proceed (error=<%s>)", + appname,cmd,strerror(errno)); + break; + } + if (fscanf(fichier,"%d",&remaining)!=1) + (void) apl_alert(0,"%s, shutdown pipe <%s> not able to catch answer)",appname,cmd); + (void) fclose(fichier); + if (remaining<2) { + status=0; + break; /*only remaining line "PID TTY TIME CMD" */ + } + (void) sleep(1); + } + (void) free(cmd); + /*Terminating container main process */ + (void) kill(cntpid,SIGKILL); + } + break; + default : /*SAFE guard */ + proceed=false; + break; + } + phase++; + } +return status; +} +/* +^L +*/ +/************************************************/ +/* */ +/* procedure to create a container */ +/* structure. */ +/* */ +/************************************************/ +static int create(int argc,char *argv[]) + +{ +#define NCREATE 4 +#define NPAR "%s %s %s %s %s" + +int status; +int phase; +int proceed; + +status=0; +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : /*check parameters num */ + if (argc (status=%d)",argv[0],status); + status=2; + phase=999; /*trouble trouble */ + } + break; + default : /*SAFE Guard */ + proceed=false; + break; + } + phase++; + } +return status; +} +/* +^L +*/ +/************************************************/ +/* */ +/* procedure to destroy a container */ +/* structure. */ +/* */ +/************************************************/ +static int destroy(int argc,char *argv[]) + +{ +#define NDEST 1 + +int status; +int phase; +int proceed; + +status=0; +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : /*check parameters num */ + if (argc (status=%d)",argv[0],status); + phase=999; /*trouble trouble */ + } + break; + default : /*SAFE Guard */ + proceed=false; + break; + } + phase++; + } +return status; +} +/* +^L +*/ +/************************************************/ +/* */ +/* procedure to start a container. */ +/* */ +/************************************************/ +static int boot(int argc,char *argv[]) + +{ +#define STKSIZE 16384 /*clone own stack */ + +int status; +int cloneflg; +char *clonestk; +char *cntdist; +char *cntarch; +pid_t cpid; +int phase; +int proceed; + +status=0; +cloneflg=SIGCHLD|__WCLONE; +cloneflg|=CLONE_NEWNET|CLONE_NEWIPC|CLONE_NEWNS|CLONE_NEWPID; +cloneflg|=CLONE_NEWUTS|CLONE_NEWUSER; +clonestk=(char *)malloc(STKSIZE); +cntdist=(char *)0; +cntarch=(char *)0; +cpid=(pid_t)0; +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : /*container name? */ + if ((argv[0]==(char *)0)||(strlen(argv[0])==0)) { + (void) apl_alert(0,"No container name specified!"); + status=1; + proceed=false; /*trouble trouble */ + } + break; + case 1 : /*checking container */ + if (cnt_iscontgood(argv[0])==false) { + (void) apl_alert(0,"Aborting container start, check configuration!"); + status=phase; + proceed=false; /*trouble trouble */ + } + break; + case 2 : /*getting a lock */ + cntarch=cnt_getarch(argv[0]); + cntdist=cnt_getdist(argv[0]); + (void) prc_divedivedive(apl_foreground); + (void) cnt_setstdio(apl_foreground,argv[0],"master.log"); + (void) prc_settitle("%s, starting %s container",appname,argv[0]); + if (lck_locking(argv[0],LCK_LOCK,5)==false) { + (void) apl_alert(0,"Unable to lock container <%s> access",argv[0]); + status=phase; + proceed=false; /*trouble trouble */ + } + break; + case 3 : /*proceeding */ + if (argv[0]!=(char *)0) { /*always */ + static ARGTYP args; + + args.mspid=getpid(); + args.arch=cntarch; + args.argc=argc; + args.argv=argv; + if ((cpid=clone(&doboot,(void *)(clonestk+STKSIZE),cloneflg,(void *)&args))<0) { + (void) apl_alert(0,"%s, Unable to clone %s container process (error=<%s>)", + appname,argv[0],strerror(errno)); + status=phase; + phase=999; /*trouble trouble */ + } + } + break; + case 4 : /*call to init script */ + /*stopping container first */ + (void) kill(cpid,SIGSTOP); + if ((status=cnt_initscript(VZOPEN,"%s %d %d %s",argv[0],getpid(),cpid,base))!=0) { + (void) apl_alert(0,"%s, Init script failure aborting %s container starting (return %d)", + appname,argv[0],status); + (void) kill(cpid,SIGKILL); + status=phase; + phase=999; /*trouble trouble */ + } + break; + case 5 : /*setting clone PID */ + if (cnt_setclonepid(argv[0],cpid)==false) { + (void) kill(cpid,SIGKILL); + status=phase; + phase=999; /*trouble trouble */ + } + break; + case 6 : /*waking up container */ + if (kill(cpid,SIGCONT)<0) { + (void) apl_alert(0,"%s, Unable to wakeup container %s process (error=<%s>)", + appname,argv[0],strerror(errno)); + (void) kill(cpid,SIGKILL); + status=phase; + phase=999; /*trouble trouble */ + } + break; + case 7 : /*waiting process */ + (void) prc_settitle("%s: container %s (%s/%s) up",appname,argv[0],cntdist,cntarch); + (void) apl_settrap(true); + (void) cnt_mstconsole(argv[0],cpid); + (void) apl_settrap(false); + cntdist=apl_freestr(cntdist); + cntarch=apl_freestr(cntarch); + break; + default : /*SAFE guard */ + (void) prc_settitle("%s: container %s in shutdown process",appname,argv[0]); + if ((status=cnt_initscript(VZCLOSE,"%s %d %s",argv[0],cpid,base))!=0) { + (void) apl_alert(0,"%s, closing script failure for %s container stopping (return %d)", + appname,argv[0],status); + } + (void) cnt_rmclonepid(argv[0]); + if (lck_locking(argv[0],LCK_UNLOCK,1)==false) { + (void) apl_alert(0,"Unable to unlock container <%s> acces",argv[0]); + status=10; + } + proceed=false; + break; + } + phase++; + } +(void) free(clonestk); +return status; +} +/* +^L +*/ +/************************************************/ +/* */ +/* procedure to start a container. */ +/* */ +/************************************************/ +static int firstboot(int argc,char *argv[]) + +{ +#define DFLDIST "RedHat"/*default distribution */ + +int status; +char *distrib; +char *domain; +char *ipnums; +char *nodename; +int phase; +int proceed; +char c; + +status=0; +distrib=strdup(DFLDIST); +domain=(char *)0; +ipnums=(char *)0; +nodename=(char *)0; +phase=0; +proceed=true; +optind=1; +while ((c=getopt(argc,argv,"+D:d:hi:l:n:"))!=EOF) { + switch(c) { + case 'D' : + if (distrib!=(char *)0) + (void) free(distrib); + distrib=strdup(optarg); + break; + case 'd' : + if (domain!=(char *)0) + (void) free(domain); + domain=strdup(optarg); + break; + case 'i' : + if (ipnums!=(char *)0) + (void) free(ipnums); + ipnums=strdup(optarg); + break; + case 'n' : + if (nodename!=(char *)0) + (void) free(nodename); + nodename=strdup(optarg); + break; + case 'h' : + default : + (void) fbusage(); + break; + } + } +argc+=optind; +argv+=optind; +while (proceed==true) { + switch (phase) { + case 0 : /*container name */ + if ((argv[0]==(char *)0)||(strlen(argv[0])==0)) { + (void) apl_alert(0,"No container name specified!"); + status=1; + proceed=false; /*trouble trouble */ + } + break; + case 1 : /*checking parameters */ + if (nodename==(char *)0) + nodename=strdup(argv[0]); + if (domain==(char *)0) { + struct utsname un; + char *ptr; + + (void) uname(&un); + if ((ptr=strchr(un.nodename,'.'))!=(char *)0) + ptr++; + else + ptr=un.nodename; + domain=strdup(ptr); + } + if (ipnums==(char *)0) + ipnums=strdup(""); + break; + case 2 : /*firstboot script */ + if ((status=cnt_initscript(VZFBOOT,"%s %s %s %s %s %s", + argv[0],distrib,domain,nodename,ipnums,base))!=0) { + (void) apl_alert(0,"%s, container %s unable to proceed with %s (return %d)", + appname,argv[0],VZFBOOT,status); + status=phase; + phase=999; /*trouble trouble */ + } + default : /*SAFE Guard */ + proceed=false; + break; + } + phase++; + } +(void) free(nodename); +(void) free(ipnums); +(void) free(domain); +(void) free(distrib); +return status; +} +/* +^L +*/ +/************************************************/ +/* */ +/* procedure to switch about proceeding */ +/* */ +/************************************************/ +static int action(int argc,char *argv[]) + +{ +int status; + +status=0; +if (argc<=0) { + (void) apl_alert(0,"%s action string requested"); + (void) usage(); + status=1; + } +else { + typedef enum { + a_firstboot, /*container firstboot */ + a_boot, /*booting container */ + a_shutdown, /*container shutdown */ + a_create, /*creating container */ + a_destroy, /*removing container */ + a_unknown /*unknown action */ + }ACTTYP; + + static VOCTYP vocaction[]={ + {a_firstboot,FBOOT,(const void *)0}, + {a_boot,"boot",(const void *)0}, + {a_shutdown,"shutdown",(const void *)0}, + {a_create,"create",(const void *)0}, + {a_destroy,"destroy",(const void *)0}, + {a_unknown,(char *)0,(const void *)0} + }; + + VOCTYP *voc; + + if ((voc=apl_getvoca(vocaction,argv[0]))!=(VOCTYP *)0) { + switch(voc->code) { + case a_firstboot : + (void) strncpy(argv[0],voc->key,strlen(voc->key)+1); + status=firstboot(argc,argv); + break; + case a_boot : + status=boot(argc-1,argv+1); + break; + case a_shutdown : + status=shutdown(argc-1,argv+1); + break; + case a_create : + status=create(argc-1,argv+1); + break; + case a_destroy : + status=destroy(argc-1,argv+1); + break; + case a_unknown : + default : + (void) apl_alert(0,"%s, <%s> unknown action string",appname,argv[0]); + status=1; + break; + } + } + } +return status; +} +/* +^L +*/ +/************************************************/ +/* */ +/* Program Entry. */ +/* */ +/************************************************/ +int main(int argc,char *argv[]) + +{ +int status; +char c; + +appname=APPNAME; +status=0; +(void) apl_trapsegv(true); +(void) dbg_setcurpath(argv[0]); +memleak=DMTRACE; /*setting memory leak detector ON */ +(void) openlog(appname,LOG_PID,0); +base=strdup(base); +argv=prc_preptitle(argc,argv,environ); +while ((c=getopt(argc,argv,"+b:d:fh:v"))!=EOF) { + switch(c) { + case 'b' : + (void) free(base); + base=apl_mkbase(optarg); + break; + case 'd' : + debug=atoi(optarg); + break; + case 'f' : + apl_foreground=true; + break; + case 'v' : + verbose=true; + break; + case 'h' : + default : + (void) usage(); + break; + } + } +(void) dbg_setcurbase(base); +if (argc>=optind) { + status=action(argc-optind,argv+optind); + } +else + (void) usage(); +argv=prc_cleantitle(); +(void) free(base); +(void) closelog(); +(void) dbg_dumpmem(appname,""); +memleak=DMFALSE; /*setting memory leak detector OFF */ +(void) apl_trapsegv(false); +exit(status); +} diff --git a/cgroup.d/Makefile b/cgroup.d/Makefile new file mode 100644 index 0000000..b1f9569 --- /dev/null +++ b/cgroup.d/Makefile @@ -0,0 +1,30 @@ +#-------------------------------------------------------------------- +#Support directory Management +#-------------------------------------------------------------------- +clean : + @ for i in $(SUBDIRS) ; \ + do \ + echo doing "\"$$i $@\"" ; \ + $(MAKE) -s -C $$i $@ ; \ + done + + +sauve : + @ for i in $(SUBDIRS) ; \ + do \ + $(MAKE) -s -C $$i $@ ; \ + done + @ echo doing RCS on $(LOCDIR) + @ ../support/sauver $(SRC) + +#-------------------------------------------------------------------- +SRC= \ + Makefile + +SUBDIRS= \ + + +LOCDIR="cgroup.d" +#=================================================================== +.PHONY: sauve clean +#-------------------------------------------------------------------- diff --git a/cgroup.d/RCS/Makefile,v b/cgroup.d/RCS/Makefile,v new file mode 100644 index 0000000..3c69e95 --- /dev/null +++ b/cgroup.d/RCS/Makefile,v @@ -0,0 +1,139 @@ +head 0.84; +access; +symbols; +locks + jmp:0.84.0.0; strict; +comment @# @; + + +0.84 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.84.0.0; +next 0.83; + +0.83 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.83.0.0; +next ; + +0.83.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next 0.83.0.1; + +0.83.0.1 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + +0.84.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + + +desc +@#-------------------------------------------------------------------- +#Support directory Management +#-------------------------------------------------------------------- +clean : + @@ for i in $(SUBDIRS) ; \ + do \ + echo doing "\"$$i $@@\"" ; \ + $(MAKE) -s -C $$i $@@ ; \ + done + + +sauve : + @@ for i in $(SUBDIRS) ; \ + do \ + $(MAKE) -s -C $$i $@@ ; \ + done + @@ echo doing RCS on $(LOCDIR) + @@ ../support/sauver $(SRC) + +#-------------------------------------------------------------------- +SRC= \ + Makefile + +SUBDIRS= \ + + +LOCDIR="cgroup.d" +#=================================================================== +.PHONY: sauve clean +#-------------------------------------------------------------------- +@ + + +0.84 +log +@upgrade version +@ +text +@#-------------------------------------------------------------------- +#Support directory Management +#-------------------------------------------------------------------- +clean : + @@ for i in $(SUBDIRS) ; \ + do \ + echo doing "\"$$i $@@\"" ; \ + $(MAKE) -s -C $$i $@@ ; \ + done + + +sauve : + @@ for i in $(SUBDIRS) ; \ + do \ + $(MAKE) -s -C $$i $@@ ; \ + done + @@ echo doing RCS on $(LOCDIR) + @@ ../support/sauver $(SRC) + +#-------------------------------------------------------------------- +SRC= \ + Makefile + +SUBDIRS= \ + + +LOCDIR="cgroup.d" +#=================================================================== +.PHONY: sauve clean +#-------------------------------------------------------------------- +@ + + +0.84.0.0 +log +@Ratrapage numero de Version +@ +text +@@ + + +0.83 +log +@Creation +#================================================================================= +@ +text +@@ + + +0.83.0.0 +log +@Ratrapage numero de Version +@ +text +@@ + + +0.83.0.1 +log +@Mise en place su GIT +@ +text +@@ diff --git a/cgroup.d/devices.allow b/cgroup.d/devices.allow new file mode 100644 index 0000000..c8ab21b --- /dev/null +++ b/cgroup.d/devices.allow @@ -0,0 +1,15 @@ +# /dev/null and zero +c 1:3 rwm +c 1:5 rwm +# consoles +c 5:1 rwm +c 5:0 rwm +c 4:0 rwm +c 4:1 rwm +# /dev/{,u}random +c 1:9 rwm +c 1:8 rwm +# /dev/ptmx +c 5:2 rwm +# ALL /dev/pts +c 136:* rwm diff --git a/cgroup.d/devices.deny b/cgroup.d/devices.deny new file mode 100644 index 0000000..d7d390b --- /dev/null +++ b/cgroup.d/devices.deny @@ -0,0 +1,2 @@ +#all device are denied +a diff --git a/chkmake b/chkmake new file mode 100644 index 0000000..e69de29 diff --git a/etc/Makefile b/etc/Makefile new file mode 100644 index 0000000..700c978 --- /dev/null +++ b/etc/Makefile @@ -0,0 +1,30 @@ +#-------------------------------------------------------------------- +#Support directory Management +#-------------------------------------------------------------------- +clean : + @ for i in $(SUBDIRS) ; \ + do \ + echo doing "\"$$i $@\"" ; \ + $(MAKE) -s -C $$i $@ ; \ + done + + +sauve : + @ for i in $(SUBDIRS) ; \ + do \ + $(MAKE) -s -C $$i $@ ; \ + done + @ echo doing RCS on $(LOCDIR) + @ ../support/sauver $(SRC) + +#-------------------------------------------------------------------- +SRC= \ + Makefile + +SUBDIRS= \ + + +LOCDIR="etc" +#=================================================================== +.PHONY: sauve clean +#-------------------------------------------------------------------- diff --git a/etc/RCS/Makefile,v b/etc/RCS/Makefile,v new file mode 100644 index 0000000..7c644ca --- /dev/null +++ b/etc/RCS/Makefile,v @@ -0,0 +1,139 @@ +head 0.84; +access; +symbols; +locks + jmp:0.84.0.0; strict; +comment @# @; + + +0.84 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.84.0.0; +next 0.83; + +0.83 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.83.0.0; +next ; + +0.83.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next 0.83.0.1; + +0.83.0.1 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + +0.84.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + + +desc +@#-------------------------------------------------------------------- +#Support directory Management +#-------------------------------------------------------------------- +clean : + @@ for i in $(SUBDIRS) ; \ + do \ + echo doing "\"$$i $@@\"" ; \ + $(MAKE) -s -C $$i $@@ ; \ + done + + +sauve : + @@ for i in $(SUBDIRS) ; \ + do \ + $(MAKE) -s -C $$i $@@ ; \ + done + @@ echo doing RCS on $(LOCDIR) + @@ ../support/sauver $(SRC) + +#-------------------------------------------------------------------- +SRC= \ + Makefile + +SUBDIRS= \ + + +LOCDIR="etc" +#=================================================================== +.PHONY: sauve clean +#-------------------------------------------------------------------- +@ + + +0.84 +log +@upgrade version +@ +text +@#-------------------------------------------------------------------- +#Support directory Management +#-------------------------------------------------------------------- +clean : + @@ for i in $(SUBDIRS) ; \ + do \ + echo doing "\"$$i $@@\"" ; \ + $(MAKE) -s -C $$i $@@ ; \ + done + + +sauve : + @@ for i in $(SUBDIRS) ; \ + do \ + $(MAKE) -s -C $$i $@@ ; \ + done + @@ echo doing RCS on $(LOCDIR) + @@ ../support/sauver $(SRC) + +#-------------------------------------------------------------------- +SRC= \ + Makefile + +SUBDIRS= \ + + +LOCDIR="etc" +#=================================================================== +.PHONY: sauve clean +#-------------------------------------------------------------------- +@ + + +0.84.0.0 +log +@Ratrapage numero de Version +@ +text +@@ + + +0.83 +log +@Creation +#================================================================================= +@ +text +@@ + + +0.83.0.0 +log +@Ratrapage numero de Version +@ +text +@@ + + +0.83.0.1 +log +@Mise en place su GIT +@ +text +@@ diff --git a/etc/groups b/etc/groups new file mode 100644 index 0000000..214fe28 --- /dev/null +++ b/etc/groups @@ -0,0 +1,4 @@ +#this file allow you to add common group to ALL +#your container when creating them +#format is +#groupname diff --git a/etc/iptables b/etc/iptables new file mode 100644 index 0000000..13ee743 --- /dev/null +++ b/etc/iptables @@ -0,0 +1,52 @@ +# iptables file standard for all CONTAINER. +# Firewall configuration written by vzgot +# the file is common and added to each container +# if present in HN /var/lib/vzgot/etc/sysconfig/iptables +# this file is given as a working example +*filter +:INPUT ACCEPT [0:0] +:FORWARD ACCEPT [0:0] +:OUTPUT ACCEPT [0:0] +:std - [0:0] +#----------------------------------------------------------- +#defining rule to display reject in logs +#(/var/log/messages) +-N logrjct +-A logrjct -j LOG --log-level 6 --log-prefix "RJCT " +-A logrjct -j REJECT --reject-with icmp-host-prohibited +#defining rule to reject without log +-N rjct +-A rjct -j DROP +#----------------------------------------------------------- +#standard rules +-A FORWARD -j std +-A INPUT -j std +#----------------------------------------------------------- +#accepting local loop +-A std -i lo -j ACCEPT +#----------------------------------------------------------- +#acceptin already established link +-A std -m state --state ESTABLISHED,RELATED -j ACCEPT +#----------------------------------------------------------- +#accepting icmp packet (should be already pre-filtered by HN) +-A std -p icmp -j ACCEPT +#----------------------------------------------------------- +#accepting auth server +-A std -p tcp -m tcp -j ACCEPT --dport auth +#accepting all Email related services +-A std -p tcp -m tcp -j ACCEPT --dport smtp +-A std -p tcp -m tcp -j ACCEPT --dport pop-3 +-A std -p tcp -m tcp -j ACCEPT --dport imaps +-A std -p tcp -m tcp -j ACCEPT --dport imap +#accepting all WEB related services +-A std -p tcp -m tcp -j ACCEPT --dport www +-A std -p tcp -m tcp -j ACCEPT --dport https +#accepting all SSH related services +-A std -p tcp -m tcp -j ACCEPT --dport ssh +#accepting all snmp related services +-A std -p udp -m udp -j ACCEPT --dport snmp +#=========================================================== +#reject and longging all other packet type +-A std -j logrjct +#----------------------------------------------------------- +COMMIT diff --git a/etc/resolv.conf b/etc/resolv.conf new file mode 100644 index 0000000..cb6df67 --- /dev/null +++ b/etc/resolv.conf @@ -0,0 +1 @@ +;this file was generated by vzgot script vzgot.fboot.redhat diff --git a/etc/shadow b/etc/shadow new file mode 100644 index 0000000..f38dcd1 --- /dev/null +++ b/etc/shadow @@ -0,0 +1,2 @@ +#this file allow you to set a specific password to container users +#format is exactly the same as a standard shadow file diff --git a/etc/snmpd.conf b/etc/snmpd.conf new file mode 100644 index 0000000..b393678 --- /dev/null +++ b/etc/snmpd.conf @@ -0,0 +1,6 @@ + + +############################################################################### +############################################################################### +#This file part is added during the container creation +############################################################################### diff --git a/etc/sudoers b/etc/sudoers new file mode 100644 index 0000000..eaeeab7 --- /dev/null +++ b/etc/sudoers @@ -0,0 +1,2 @@ +#This file is a configuration file which contents is ADDED +#to the container /etc/sudoers file diff --git a/etc/users b/etc/users new file mode 100644 index 0000000..3465de9 --- /dev/null +++ b/etc/users @@ -0,0 +1,4 @@ +#this file allow you to add common users to ALL +#your container when creating them +#format is +#username encrypted_password groupd-name diff --git a/lib/GPL b/lib/GPL new file mode 100644 index 0000000..26c8c09 --- /dev/null +++ b/lib/GPL @@ -0,0 +1,25 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ diff --git a/lib/Makefile b/lib/Makefile new file mode 100644 index 0000000..fe21329 --- /dev/null +++ b/lib/Makefile @@ -0,0 +1,13 @@ +#-------------------------------------------------------------------- +sauve : + @ echo doing RCS on $(LOCDIR) + ../support/sauver $(SRC) +#-------------------------------------------------------------------- +#Sources contents +SRC= \ + subapl.h + +LOCDIR= lib +#-------------------------------------------------------------------- +include Makefile.inc +#-------------------------------------------------------------------- diff --git a/lib/Makefile.inc b/lib/Makefile.inc new file mode 100644 index 0000000..843531c --- /dev/null +++ b/lib/Makefile.inc @@ -0,0 +1,84 @@ +#-------------------------------------------------------------------- +#to compile vzgot opensrc library +#-------------------------------------------------------------------- +debug : + @ $(MAKE) \ + OPTIME="-g" \ + DEBUG="-DDEBUG" \ + YVERB="-v" \ + memlib + +prod : + @ $(MAKE) \ + OPTIME="-g3" \ + memlib + +memlib : + @ $(MAKE) $(VZLB) + +clean : + @ - rm -f $(VZLB) $(OBJS) + @ - rm -f *~ + +#-------------------------------------------------------------------- +#Object file list to generate +OBJS= \ + unicnt.o unilck.o \ + subapl.o subprc.o \ + utlvec.o utlprc.o \ + dbgmem.o + +VZLB= \ + vzlb.a +#-------------------------------------------------------------------- +#dependancies +vzlb.a : $(OBJS) + ar -cr vzlb.a $(OBJS) +#-------------------------------------------------------------------- +#'C' Definition + +unicnt.o: \ + lowtyp.h \ + dbgmem.h \ + subapl.h \ + unicnt.h unicnt.c + +uniclk.o: \ + lowtyp.h \ + dbgmem.h \ + subapl.h \ + unilck.h unilck.c + +subprc.o: \ + lowtyp.h \ + dbgmem.h \ + utlvec.h \ + subprc.h subprc.c + +subapl.o: \ + lowtyp.h \ + dbgmem.h \ + utlprc.h \ + subapl.h subapl.c + +utlprc.o: \ + lowtyp.h \ + dbgmem.h \ + utlprc.h utlprc.c + +utlvec.o: \ + lowtyp.h \ + dbgmem.h \ + utlvec.h utlvec.c + +dbgmem.o: \ + dbgmem.h dbgmem.c + +#-------------------------------------------------------------------- +#compiler options +YFLAGS= -p $* $(YVERB) +CC=gcc $(OPTIME) $(DEBUG) $(POSTGRESQL) $(MYSQL) +CFLAGS=-I . \ + -DUCD_COMPATIBLE -std=gnu99 -pedantic -D_GNU_SOURCE \ + -Wall -Wshadow -DDIST_$(DIST) +#-------------------------------------------------------------------- diff --git a/lib/RCS/subapl.h,v b/lib/RCS/subapl.h,v new file mode 100644 index 0000000..1e0555d --- /dev/null +++ b/lib/RCS/subapl.h,v @@ -0,0 +1,315 @@ +head 0.84; +access; +symbols; +locks + jmp:0.84.0.0; strict; +comment @ * @; + + +0.84 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.84.0.0; +next 0.83; + +0.83 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.83.0.0; +next ; + +0.83.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next 0.83.0.1; + +0.83.0.1 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + +0.84.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + + +desc +@/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* Define sub level procedure needed by */ +/* the application. */ +/* */ +/************************************************/ +#ifndef SUBAPL +#define SUBAPL +#include +#include +#include +#include "lowtyp.h" + + +/*vzboot application name */ +#define VZGOT "vzgot" +/*vzboot current application revision level */ +#define VZBVERS "$Revision: 0.84.0.0 $" + + +/*transit subdirectory name */ +#define TSUFFIX "-S" + +/*defining application directory */ +typedef enum { + d_tmp, /*directory /tmp */ + d_crash, /*the crash directory */ + d_etc, /*directory is /etc */ + d_ubin, /*directory /usr/bin */ + d_usbin, /*directory /usr/sbin */ + d_usrlib, /*directory /usr/lib */ + d_varlib, /*directory /var/lib */ + d_spool, /*spool directory */ + d_log, /*logs directory */ + d_lock, /*locking directory */ + d_vzgot, /*application main dir */ + d_null /*no directoy specified */ + }DIRENUM; + +typedef struct { /*vocable table type */ + int code; /*code value */ + const char *key;/*key code */ + const void *ptr;/*pay load */ + }VOCTYP; + +/*Signal flag definition */ +extern int sigterm; +extern int sigquit; +extern int sigint; + +/*application current version number */ +extern const char *curvers; +/*application working base directory */ +extern char *base; +/*application name */ +extern char *appname; +/*application debug level */ +extern int debug; +/*application verbosity level */ +extern int verbose; +/*application working mode foreground/background*/ +extern int apl_foreground; + +extern int apl_isdir(char *dirpath); +extern char *apl_freestr(char *str); +extern char *apl_getvers(); +extern u_long apl_getmillisec(); +extern char *apl_uniquename(unsigned int seq); +extern u_long apl_date(time_t curtime); +extern char *apl_ascsystime(time_t curtime); +extern char *apl_ascsysdate(time_t curtime); +extern char *apl_ascsysdatetime(time_t curtime); +extern char *apl_ascsysstamp(time_t curtime); +extern time_t apl_datetimesysasc(char *strdate,char *strtime); +extern void apl_alert(const int dlevel,const char *fmt,...); +extern void apl_argvtrace(const int dlevel,const char *fmt,char *argv[]); +extern char *apl_mkbase(char *newbase); +extern char *apl_appdir(DIRENUM dir); +extern void apl_trapsegv(int onoff); +extern void apl_core_dump(char *frmt, ...); +extern void apl_settrap(int set); +extern char *apl_strtolower(char *str); +extern char *apl_getstr(FILE *fichier,char *str,u_int taille,char carcom); +extern int apl_createdirs(char *dirname); +extern char *apl_getapvers(); +extern VOCTYP *apl_getvoca(const VOCTYP *table,char *str); +extern char *apl_cleanstring(char *str); +#endif +@ + + +0.84 +log +@upgrade version +@ +text +@/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* Define sub level procedure needed by */ +/* the application. */ +/* */ +/************************************************/ +#ifndef SUBAPL +#define SUBAPL +#include +#include +#include +#include "lowtyp.h" + + +/*vzboot application name */ +#define VZGOT "vzgot" +/*vzboot current application revision level */ +#define VZBVERS "$Revision: 0.83.0.1 $" + + +/*transit subdirectory name */ +#define TSUFFIX "-S" + +/*defining application directory */ +typedef enum { + d_tmp, /*directory /tmp */ + d_crash, /*the crash directory */ + d_etc, /*directory is /etc */ + d_ubin, /*directory /usr/bin */ + d_usbin, /*directory /usr/sbin */ + d_usrlib, /*directory /usr/lib */ + d_varlib, /*directory /var/lib */ + d_spool, /*spool directory */ + d_log, /*logs directory */ + d_lock, /*locking directory */ + d_vzgot, /*application main dir */ + d_null /*no directoy specified */ + }DIRENUM; + +typedef struct { /*vocable table type */ + int code; /*code value */ + const char *key;/*key code */ + const void *ptr;/*pay load */ + }VOCTYP; + +/*Signal flag definition */ +extern int sigterm; +extern int sigquit; +extern int sigint; + +/*application current version number */ +extern const char *curvers; +/*application working base directory */ +extern char *base; +/*application name */ +extern char *appname; +/*application debug level */ +extern int debug; +/*application verbosity level */ +extern int verbose; +/*application working mode foreground/background*/ +extern int apl_foreground; + +extern int apl_isdir(char *dirpath); +extern char *apl_freestr(char *str); +extern char *apl_getvers(); +extern u_long apl_getmillisec(); +extern char *apl_uniquename(unsigned int seq); +extern u_long apl_date(time_t curtime); +extern char *apl_ascsystime(time_t curtime); +extern char *apl_ascsysdate(time_t curtime); +extern char *apl_ascsysdatetime(time_t curtime); +extern char *apl_ascsysstamp(time_t curtime); +extern time_t apl_datetimesysasc(char *strdate,char *strtime); +extern void apl_alert(const int dlevel,const char *fmt,...); +extern void apl_argvtrace(const int dlevel,const char *fmt,char *argv[]); +extern char *apl_mkbase(char *newbase); +extern char *apl_appdir(DIRENUM dir); +extern void apl_trapsegv(int onoff); +extern void apl_core_dump(char *frmt, ...); +extern void apl_settrap(int set); +extern char *apl_strtolower(char *str); +extern char *apl_getstr(FILE *fichier,char *str,u_int taille,char carcom); +extern int apl_createdirs(char *dirname); +extern char *apl_getapvers(); +extern VOCTYP *apl_getvoca(const VOCTYP *table,char *str); +extern char *apl_cleanstring(char *str); +#endif +@ + + +0.84.0.0 +log +@Ratrapage numero de Version +@ +text +@d42 1 +a42 1 +#define VZBVERS "$Revision: 0.84 $" +@ + + +0.83 +log +@Creation +#================================================================================= +@ +text +@d42 1 +a42 1 +#define VZBVERS "$Revision: 0.84.0.0 $" +@ + + +0.83.0.0 +log +@Ratrapage numero de Version +@ +text +@d42 1 +a42 1 +#define VZBVERS "$Revision: 0.83 $" +@ + + +0.83.0.1 +log +@Mise en place su GIT +@ +text +@d42 1 +a42 1 +#define VZBVERS "$Revision: 0.83.0.0 $" +@ diff --git a/lib/dbgmem.c b/lib/dbgmem.c new file mode 100644 index 0000000..22c6728 --- /dev/null +++ b/lib/dbgmem.c @@ -0,0 +1,799 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* Implement very sub level procedure to */ +/* debug potential memory leak (or other) */ +/* trouble. */ +/* */ +/************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "dbgmem.h" + +#undef calloc +#undef malloc +#undef realloc +#undef free +#undef putenv +#undef setenv +#undef unsetenv +#undef strdup +#undef asprintf +#undef vasprintf + + +#define MXTB 10 /*max trace deep */ + +extern char **environ; /*application env varirable */ + + +typedef struct timeval TIMEVAL; + +typedef struct { /*leak detection structure */ + void *ptr; /*allocated memory */ + TIMEVAL date; /*allocation date */ + size_t size; /*memory size */ + void *tb[MXTB]; /*back trace */ + int noleak; /*No leak consideration flag */ + }LEAKTYP; + +int memleak=DMFALSE; /*flag to check for memory leak */ + +static void *memory; /*allocated memory structure */ +static long nummem; /*number of leak structure */ +static char *cpath; /*Application curpath */ +static char *cbase; /*Application base */ +static int flgleak; /*leak mod flag */ +static u_long collected;/*number of memory still open */ +static LEAKTYP **memsort; +/* + +*/ +/************************************************/ +/* */ +/* Procedure to compare to "leaking" memory*/ +/* ptr, used by search routine */ +/* */ +/************************************************/ +static int cmpptr(const void *v1,const void *v2) + +{ +register u_long p1; +register u_long p2; + +if (v1==(void *)0) { + if (v2==(void *)0) + return 0; + else + return -1; + } +if (v2==(void *)0) + return 1; +p1=(u_long)(((LEAKTYP *)v1)->ptr); +p2=(u_long)(((LEAKTYP *)v2)->ptr); +if (p1>p2) + return 1; +if (p1noleak=flgleak; + break; + } +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to count collected "leaking" */ +/* memory. */ +/* */ +/************************************************/ +static void collectleakptr(const void *v1,const VISIT which,const int depth) + +{ +switch (which) { + case preorder: /*no remote dump */ + case endorder: + break; + case postorder: /*remote dump */ + case leaf: + if ((*((LEAKTYP **)v1))->noleak==0) { + memsort[collected]=*((LEAKTYP **)v1); + collected++; + } + break; + } +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to compare to "leaking" memory*/ +/* information, from the backtrace stand */ +/* point. */ +/* */ +/************************************************/ +static int sametrace(const LEAKTYP *l1,const LEAKTYP *l2) + +{ +int inx; +long diff; + +inx=0; +diff=0; +while ((inxtb[inx])-(long)(l2->tb[inx]); + inx++; + } +return diff; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to compare to "leaking" memory*/ +/* information */ +/* */ +/************************************************/ +static int cmpleak(const void *p1,const void *p2) + +{ +int diff; +LEAKTYP *l1; +LEAKTYP *l2; + +l1=((LEAKTYP **)p1)[0]; +l2=((LEAKTYP **)p2)[0]; +if ((diff=sametrace(l1,l2))==0) + diff=l1->date.tv_sec-l2->date.tv_sec; + if (diff==0) + diff=l1->date.tv_usec-l2->date.tv_usec; +return diff; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to convert back trace address */ +/* to sources line information. */ +/* */ +/************************************************/ +static void disline(LEAKTYP *leak,const char *path,FILE *fichier) + +{ +#define ADDR2LINE "addr2line" + +int i; +FILE *canal; +char command[1000]; + +(void) sprintf(command,"%s -e %s",ADDR2LINE,path); +for (i=0;itb[i]==0) + break; + (void) sprintf(str," %08lx",(long)leak->tb[i]); + (void) strcat(command,str); + } +if ((canal=popen(command,"r"))!=(FILE *)0) { + char line[200]; + + while (fgets(line,sizeof(line)-1,canal)!=(char *)0) { + (void) fprintf(fichier,"%s",line); + } + (void) fclose(canal); + } +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to assigne a Backtrace stack */ +/* (to trace back leak) to memory structure*/ +/* */ +/************************************************/ +static void setbtrace(LEAKTYP *leak,int step) + +{ +#define MXSTEP 10 + +void *zone[MXSTEP]; +int num; +int i,j; +struct timezone tz; + +(void) memset(zone,'\000',sizeof(zone)); +num=backtrace(zone,MXSTEP); +for (j=0,i=step+1;(jtb[j]=zone[i]; + } +(void) gettimeofday(&(leak->date),&tz); +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to report backtrace via syslog*/ +/* */ +/************************************************/ +static void logbacktrace(int loglev,int step) + +{ +#define MXSTEP 10 + +void *zone[MXSTEP]; +int num; +int i; + +(void) memset(zone,'\000',sizeof(zone)); +num=backtrace(zone,MXSTEP); +for (i=step;i %08lx",(long)zone[i]); + } +} +/* + +*/ +/************************************************/ +/* */ +/* procedure to get a "leak proof" memory */ +/* email to a shell script */ +/* */ +/************************************************/ +static void *getmemory(size_t size,int step) + +{ +register LEAKTYP *leak; +register void **leakptr; + +leak=(LEAKTYP *)calloc(1,sizeof(LEAKTYP)); +leak->size=size; +leak->ptr=malloc(size); +(void) setbtrace(leak,step+1); +leakptr=tsearch((void *)leak,&memory,cmpptr); +if (*leakptr!=leak) { + (void) syslog(LOG_DEBUG,"getmemory trouble PTR already within tsearch"); + } +nummem++; +return leak->ptr; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to memorise the current */ +/* application path, will be used to */ +/* dump the memory stat. */ +/* */ +/************************************************/ +void dbg_setcurpath(char *path) + +{ +cpath=strdup(path); +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to memorise the current */ +/* application base, will be used to */ +/* dump the memory stat. */ +/* */ +/************************************************/ +void dbg_setcurbase(char *path) + +{ +cbase=strdup(path); +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to assigne new memory area */ +/* while checking (if needed) for memory */ +/* leakage. */ +/* */ +/************************************************/ +void *dbg_malloc(size_t size) + +{ +void *ptr; + +if (memleak==DMTRUE) { + ptr=getmemory(size,1); + } +else + ptr=malloc(size); +return ptr; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to assigne clean new memory */ +/* while checking (if needed) for memory */ +/* leakage. */ +/* */ +/************************************************/ +void *dbg_calloc(size_t nmemb,size_t size) + +{ +void *ptr; + +if (memleak==DMTRUE) { + ptr=getmemory(nmemb*size,1); + (void) memset(ptr,'\000',nmemb*size); + } +else + ptr=calloc(nmemb,size); +return ptr; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to free memory from memry pool*/ +/* while checking (if needed) for memory */ +/* leakage. */ +/* */ +/************************************************/ +void dbg_free(void *ptr) + +{ +if (memleak==DMTRUE) { + LEAKTYP **leakpt; + LEAKTYP leak; + + leak.ptr=ptr; + if ((leakpt=(LEAKTYP **)tfind(&leak,&memory,cmpptr))!=(LEAKTYP **)0) { + LEAKTYP *lk; + + lk=*leakpt; + (void) tdelete(*leakpt,&memory,cmpptr); + (void) free(lk->ptr); + (void) free(lk); + nummem--; + } + else { + char *strloc="subsys.c:dbg_free, Unable to find 'leak memory' " + "for ptr '%08lx'=<%s>\n"; + + (void) syslog(LOG_INFO,strloc,(long)ptr,(char *)ptr); + (void) setbtrace(&leak,0); + (void) fprintf(stderr,strloc,(long)ptr,(char *)ptr); + (void) disline(&leak,cpath,stderr); + (void) fprintf(stderr,"\n"); + } + } +else + (void) free(ptr); +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to remove a variable from the */ +/* environement list */ +/* */ +/************************************************/ +int dbg_unsetenv(const char *name) + +{ +int status; + +status=-1; +errno=EINVAL; +if (memleak==DMTRUE) { + if (environ!=(char **)0) { + int i; + + for (i=0;environ[i]!=(char *)0;i++) { + char *ptr; + + if ((ptr=strstr(environ[i],name))==(char *)0) + continue; + if (*(environ[i]+strlen(name))=='=') { + (void) dbg_free(ptr); + do { + environ[i]=environ[i+1]; + i++; + } + while (environ[i]!=(char *)0); + status=0; + break; + } + } + } + } +else + status=unsetenv(name); +return status; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to install variable within the*/ +/* environnement */ +/* */ +/************************************************/ +int dbg_putenv(char *valeur) + +{ +int status; + +status=-1; +if (memleak==DMTRUE) { + register char *ptr; + + if ((ptr=strchr(valeur,'='))!=(char *)0) { + register int found; + register int taille; + register int tocheck; + + found=0; + taille=0; + if ((tocheck=(ptr-valeur))<=0) + return status; + status=0; + if (environ!=(char **)0) { + for (;environ[taille]!=(char *)0;taille++) { + if (strncmp(valeur,environ[taille],tocheck)==0) { + (void) dbg_free(environ[taille]); + environ[taille]=valeur; + found=1; + break; + } + } + } + else + environ=dbg_calloc(1,sizeof(char *)); + if (found==0) { + environ=(char **)dbg_realloc((void *)environ,(taille+2)*sizeof(char *)); + environ[taille]=valeur; + environ[taille+1]=(char *)0; + } + } + } +else { + status=putenv(valeur); + } +return status; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to set variable within the */ +/* environement */ +/* */ +/************************************************/ +int dbg_setenv(const char *name,const char *value,int overwrite) + +{ +int status; + +status=0; +if (memleak==DMTRUE) { + char *newvar; + char *ptr; + + (void) dbg_asprintf(&newvar,"%s=%s",name,value); + if ((ptr=getenv(name))!=(char *)0) { + if (overwrite!=0) + (void) dbg_unsetenv(name); + else { + (void) dbg_free(newvar); + newvar=(char *)0; + } + } + if (newvar!=(char *)0) { + (void) dbg_putenv(newvar); + } + } +else { + status=setenv(name,value,overwrite); + } +return status; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to reallocate memory from pole*/ +/* while checking (if needed) for memory */ +/* leakage. */ +/* */ +/************************************************/ +void *dbg_realloc(void *ptr,size_t size) + +{ +if (memleak==DMTRUE) { + if (ptr==(void *)0) + ptr=getmemory(size,1); + else { + LEAKTYP **leakpt; + LEAKTYP leak; + + leak.ptr=ptr; + if ((leakpt=(LEAKTYP **)tfind(&leak,&memory,cmpptr))!=(LEAKTYP **)0) { + LEAKTYP *lk; + + lk=*leakpt; + (void) tdelete(*leakpt,&memory,cmpptr); + ptr=realloc(ptr,size); + lk->ptr=ptr; + lk->size=size; + (void) setbtrace(lk,1); + (void) tsearch(lk,&memory,cmpptr); + } + else { + char *strloc="subsys.c:dbg_realloc, Unable to find 'leak memory' " + "for ptr '%08lx'=<%s>\n"; + + (void) fprintf(stderr,strloc,(long)ptr,(char *)ptr); + (void) syslog(LOG_DEBUG,strloc,(long)ptr,(char *)ptr); + (void) logbacktrace(LOG_DEBUG,2); + ptr=(void *)0; + } + } + } +else + ptr=realloc(ptr,size); +return ptr; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to allocate memory to */ +/* duplicate a string. */ +/* */ +/************************************************/ +char *dbg_strdup(const char *str) + +{ +char *ptr; + +if (str==(char *)0) { + /*NULL PTR to duplicate?! crashing HARD */ + (void) kill(getpid(),SIGSEGV); + } +if (memleak==DMTRUE) { + ptr=getmemory(strlen(str)+3,1); + (void) strcpy(ptr,str); + } +else + ptr=strdup(str); +return ptr; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to allocate a string within */ +/* a dynamic memory using a va_list */ +/* */ +/************************************************/ +int dbg_vasprintf(char **strp, const char *fmt,va_list args) + +{ +int count; + +count=-1; +if (memleak==DMTRUE) { + char *strloc; + + count=vasprintf(&strloc,fmt,args); + *strp=dbg_strdup(strloc); + (void) free(strloc); + } +else { + count=vasprintf(strp,fmt,args); + } +return count; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to allocate a string within */ +/* a dynamic memory */ +/* */ +/************************************************/ +int dbg_asprintf(char **strp, const char *fmt, ...) + +{ +int count; +va_list args; + +count=-1; +va_start(args,fmt); +if (memleak==DMTRUE) + count=dbg_vasprintf(strp,fmt,args); +else + count=vasprintf(strp,fmt,args); +va_end(args); +return count; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to free memory allocated by */ +/* a library procedure (as scandir) */ +/* Memory allocated by such library routine*/ +/* are not known by leak detection. */ +/* */ +/************************************************/ +void dbg_sysfree(void *ptr) + +{ +(void) free(ptr); +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to flag current memory as not */ +/* to be checked against memory leak */ +/* Implementation is such memory can be */ +/* flagged/unflagged as a no memory leak. */ +/* noleak value should always be positive. */ +/* */ +/************************************************/ +void dbg_setnoleak(register int value) + +{ +flgleak=value; +(void) twalk(memory,setleakflg); +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to dump current memory */ +/* allocation and detect memory allocation */ +/* */ +/* Data will be dumped on /tmp under */ +/* application name and process pid. */ +/* */ +/************************************************/ +void dbg_dumpmem(const char *apname,const char *extension) + +{ +#define DUMPFRM "%s/var/tmp/%s%s%s.%05d" + +if (memleak==DMTRUE) { + char *sep; + FILE *fichier; + char *name; + LEAKTYP *leak; + + sep="-"; + collected=0; + if ((extension==(char *)0)||(strlen(extension)==0)) { + sep=""; + extension=""; + } + (void) asprintf(&name,DUMPFRM,cbase,apname,sep,extension,getpid()); + if ((fichier=fopen(name,"w"))==(FILE *)0) { + (void) fprintf(stderr,"dbg_dumpmem unable to open file <%s> (error=<%s>)\n", + name,strerror(errno)); + fichier=stderr; + } + memsort=(LEAKTYP **)0; + if (nummem>0) { + memsort=(LEAKTYP **)calloc(nummem,sizeof(LEAKTYP *)); + (void) twalk(memory,collectleakptr); + } + if (collected>0) { + register int i; + + (void) fprintf(fichier,"%05ld memory allocation still open\n",collected); + (void) qsort(memsort,collected,sizeof(LEAKTYP *),cmpleak); + leak=(LEAKTYP *)0; + for (i=0;idate.tv_sec)); + (void) strftime(strtime,sizeof(strtime),STRTIME,tm); + (void) fprintf(fichier,"\t size=%05ld age='%s.%06ld' ptr=%08lx->'%s'\n", + (long)(memsort[i]->size), + strtime,memsort[i]->date.tv_usec, + (long)(memsort[i]->ptr), + (char *)(memsort[i]->ptr)); + } + } + else { +#ifdef DEBUGMEM + (void) fprintf(fichier,"No memory leak detected\n"); +#else + (void) fprintf(fichier,"No memory leak detector\n(comment in " + "'#define DEBUGMEM' within dbgmem.h)\n"); +#endif + } + (void) fclose(fichier); + (void) free(name); + } +} diff --git a/lib/dbgmem.h b/lib/dbgmem.h new file mode 100644 index 0000000..9929c07 --- /dev/null +++ b/lib/dbgmem.h @@ -0,0 +1,94 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* Define sub level procedure to debug */ +/* memory problem */ +/* */ +/************************************************/ +#ifndef DBGMEM +#define DBGMEM +#include +#include + +/*define it at compile if you want to look for */ +/*memory leak, report is displayed each time */ +/*dbg_dumpmem is called. */ +#ifdef DEBUG +#define DEBUGMEM +/* +*/ +#endif + +/*to activate Memory leak detector */ +#define DMTRUE 1 /*Boolean */ +#define DMFALSE 0 /*Boolean */ + +#ifdef DEBUGMEM +#ifndef DEBUG +#error "Caution, See dbgmem.h," +#error "you should use DEBUGMEM in DEBUG compilation mode" +#endif +#define DMTRACE DMTRUE +#else +#define DMTRACE DMFALSE +#endif + +#ifdef DEBUGMEM +#define calloc dbg_calloc +#define malloc dbg_malloc +#define realloc dbg_realloc +#define free dbg_free +#define putenv dbg_putenv +#define setenv dbg_setenv +#define unsetenv dbg_unsetenv +#define asprintf dbg_asprintf +#define vasprintf dbg_vasprintf +#define SYSfree dbg_sysfree + +#undef strdup +#define strdup dbg_strdup +#else +#define SYSfree free +#endif + +extern int memleak; + +extern void dbg_setcurpath(char *path); +extern void dbg_setcurbase(char *path); +extern void *dbg_malloc(size_t size); +extern void *dbg_calloc(size_t nmemb,size_t size); +extern void *dbg_realloc(void *ptr,size_t size); +extern char *dbg_strdup(const char *str); +extern void dbg_free(void *ptr); +extern int dbg_putenv(char *valeur); +extern int dbg_setenv(const char *name,const char *value,int overwrite); +extern int dbg_unsetenv(const char *name); +extern int dbg_vasprintf(char **strp, const char *fmt,va_list args); +extern int dbg_asprintf(char **strp, const char *fmt, ...); +extern void dbg_sysfree(void *ptr); +extern void dbg_dumpmem(const char *apname,const char *extension); +extern void dbg_setnoleak(int value); +#endif diff --git a/lib/lowtyp.h b/lib/lowtyp.h new file mode 100644 index 0000000..d60a1bb --- /dev/null +++ b/lib/lowtyp.h @@ -0,0 +1,43 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* Define very bottom level structure type */ +/* */ +/************************************************/ +#ifndef LOWTYP +#define LOWTYP + +/*defining troolean value */ +typedef enum {false,true,maybe} TROOL; + +typedef struct timespec TIMESPEC; + +/*a 8 Bytes wide integer */ +typedef unsigned long long u_vlong; +typedef long long vlong; + +#define CHARNULL (void *)0 +#endif diff --git a/lib/subapl.c b/lib/subapl.c new file mode 100644 index 0000000..feaaf0b --- /dev/null +++ b/lib/subapl.c @@ -0,0 +1,862 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon */ +/* Distributed under the Gnu Public */ +/* License, see the License file in this */ +/* package. */ +/* */ +/* Implement very sub level procedure to */ +/* handle clement specific needs. */ +/* */ +/************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "dbgmem.h" +#include "lowtyp.h" +#include "utlprc.h" +#include "subapl.h" + +/*debug level */ +#if DEBUG +#define TRALOG LOG_DEBUG +#else +#define TRALOG LOG_INFO +#endif + +/*setting the applocation version */ +const char *curvers=VZBVERS; +/*sigterm request flag */ + int sigterm=false; +/*sigquit request flag */ + int sigquit=false; +/*sigint request flag */ + int sigint=false; +/*current debug level */ + int debug=0; +/*flag application running background/foreground*/ + int apl_foreground=false; +/*debug log in verbose mode */ + int verbose=false; +/*base directory (where to store internal data) */ + char *base=""; /*no prefix */ + +/*application name */ + char *appname=VZGOT; +/* + +*/ +/************************************************/ +/* */ +/* Procedure to catch signal and do what is*/ +/* needed. */ +/* */ +/************************************************/ +static void trapsig(int sig) + +{ +sigset_t blockmask; +sigset_t oldset; +struct sigaction sa; + +(void) sigfillset(&blockmask); +(void) sigprocmask(SIG_SETMASK,&blockmask,&oldset); +if (debug>=20) + (void) fprintf(stderr,"subclm.c:trapsig <%s/%d> received (by pid='%d')\n", + sys_siglist[sig],sig,getpid()); +switch (sig) { + case SIGINT : + sigint=true; + break; + case SIGQUIT : + sigquit=true; + sigterm=true; + break; + case SIGUSR1 : + debug++; + (void) fprintf(stderr,"Increased debug level to '%d' (pid='%d')\n",debug,getpid()); + break; + case SIGUSR2 : + if (debug>0) { + debug--; + (void) fprintf(stderr,"Decreased debug level to '%d' (pid='%d')\n",debug,getpid()); + } + break; + case SIGTERM : + sigterm=true; + break; + default : + (void) fprintf(stderr,"%s, Unexpected signal <%s> received\n", + appname,sys_siglist[sig]); + break; + } +/*restarting signal */ +(void) sigemptyset(&sa.sa_mask); +sa.sa_handler=trapsig; +sa.sa_flags=0; +(void) sigprocmask(SIG_SETMASK,&oldset,(sigset_t *)0); +(void) sigaction(sig,&sa,(struct sigaction *)0); +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to catch signal and do what is*/ +/* needed. */ +/* */ +/************************************************/ +static void trpmempbls(int sig) + +{ +#define OPPB "subclm.c:trpmempbls," + +switch (sig) { + case SIGSEGV : + (void) apl_core_dump("Program genuine memory violation"); + break; + default : + (void) apl_core_dump("%s Unexpected signal <%s> received", + OPPB,sys_siglist[sig]); + break; + } +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to check if directory is */ +/* already existing. */ +/* */ +/************************************************/ +int apl_isdir(char *dirpath) + +{ +int status; +struct stat bufstat; + +status=-1; +if (stat(dirpath,&bufstat)==0) { + if (S_ISDIR(bufstat.st_mode)!=0) { + status=0; + } + } +return status; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to free memory used by a */ +/* string, do not proceed if point is NULL.*/ +/* */ +/************************************************/ +char *apl_freestr(char *str) + +{ +if (str!=(char *)0) { + (void) free(str); + } +return (char *)0; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to extract and return current */ +/* version number. */ +/* */ +/************************************************/ +char *apl_getvers() + +{ +static char *vernum=(char *)0; +static char numero[30]; + +if (vernum==(char *)0) { + int num1,num2,num3,num4; + char revision[30]; + + (void) sscanf(curvers,"%s %d.%d.%d.%d",revision,&num1,&num2,&num3,&num4); + (void) sprintf(numero,"%d.%d-%d",num1,num2,num4); + vernum=numero; + } +return vernum; +} +/* +^L +*/ +/************************************************/ +/* */ +/* Procedure to return the current time */ +/* expressed with a millisecond precision. */ +/* */ +/************************************************/ +u_long apl_getmillisec() + +{ +static time_t start=(time_t)0; + +u_long millisec; +struct timeval newtime; + +millisec=(u_long)0; +(void) gettimeofday(&newtime,(struct timezone *)0); +if (start==(time_t)0) + start=(newtime.tv_sec-1); +millisec=newtime.tv_sec-start; +millisec*=1000; +millisec+=(newtime.tv_usec/1000); +return millisec; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to make create a unique name */ +/* can be used to store process data */ +/* name return is dynamically allocated. */ +/* */ +/************************************************/ +char *apl_uniquename(unsigned int seq) + +{ +#define UFTIME "%Y%m%d%H%M%S" +#define UNIQUE "%05d-%s-%08lx" + +char *uniquename; +time_t curtime; +struct tm *tminfo; +char asctemps[100]; + +curtime=time((time_t)0); +tminfo=localtime(&curtime); +(void) strftime(asctemps,sizeof(asctemps),UFTIME,tminfo); +(void) asprintf(&uniquename,UNIQUE,getpid(),asctemps,apl_getmillisec()+seq); +return uniquename; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to return a time seen as local*/ +/* time to a long express as YYYYMMDD */ +/* */ +/************************************************/ +u_long apl_date(time_t curtime) + +{ +struct tm *tm; + +tm=localtime(&curtime); +return (tm->tm_year*10000)+(tm->tm_mon*100)+tm->tm_mday; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to return the local time in */ +/* HH:MM:SS format. */ +/* Time is stored in a STATIC memeory area */ +/* */ +/************************************************/ +char *apl_ascsystime(time_t curtime) + +{ +#define TTIME "%H:%M:%S" + +static char asctemps[100]; + +struct tm *tminfo; + +tminfo=localtime(&curtime); +(void) strftime(asctemps,sizeof(asctemps),TTIME,tminfo); +return asctemps; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to return system time from an */ +/* YYYY-MM-DDD HH:MM:SS format. */ +/* */ +/************************************************/ +time_t apl_datetimesysasc(char *strdate,char *strtime) + +{ +#define DBDTOUNIX "%Y-%m-%d %H:%M:%S" +time_t datetime; + +datetime=(time_t)0; +if ((strdate!=(char *)0)&&(strtime!=(char *)0)) { + struct tm tm; + char strdt[100]; + + (void) memset(&tm,'\000',sizeof(struct tm)); + tm.tm_isdst=-1; + (void) snprintf(strdt,sizeof(strdt),"%s %s",strdate,strtime); + if (strptime(strdt,DBDTOUNIX,&tm)!=(char *)0) { + datetime=mktime(&tm); + } + else { + (void) apl_alert(0,"subclm.c:apl_datetimesysasc Unable to convert <%s> to time_t",strdt); + } + } +return datetime; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to return the local time in */ +/* YYYY-MM-DDD format. */ +/* date is stored in a STATIC memeory area */ +/* */ +/************************************************/ +char *apl_ascsysdate(time_t curtime) + +{ +#define TDATE "%Y-%m-%d" + +static char asctemps[100]; + +struct tm *tminfo; + +tminfo=localtime(&curtime); +(void) strftime(asctemps,sizeof(asctemps),TDATE,tminfo); +return asctemps; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to return the local time in */ +/* YYYY-MM-DDD HH:MM:SS format. */ +/* date is stored in a STATIC memeory area */ +/* */ +/************************************************/ +char *apl_ascsysdatetime(time_t curtime) + +{ +#define TDTIME "%Y-%m-%d %H:%M:%S" + +static char asctemps[100]; + +struct tm *tminfo; + +tminfo=localtime(&curtime); +(void) strftime(asctemps,sizeof(asctemps),TDTIME,tminfo); +return asctemps; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to transform the local system */ +/* time in ASCII time stamp. */ +/* Stored in STATIC memory area. */ +/* */ +/************************************************/ +char *apl_ascsysstamp(time_t curtime) + +{ +#define TSTAMP "%a, %d %b %Y %H:%M:%S" + +static char ascstamp[100]; + +struct tm *tminfo; +char asct[80]; + +tminfo=localtime(&curtime); +(void) strftime(asct,sizeof(asct),TSTAMP,tminfo); +(void) snprintf(ascstamp,sizeof(ascstamp),"%s %05ld",asct, + ((tminfo->tm_gmtoff/3600)*100)+ + ((tminfo->tm_gmtoff%3600)/60)); +return ascstamp; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to display an alert in the */ +/* debug log. */ +/* */ +/************************************************/ +void apl_alert(const int dlevel,const char *fmt,...) + +{ +if (debug>=dlevel) + { + va_list args; + char *strloc; + + va_start(args,fmt); + (void) vasprintf(&strloc,fmt,args); + if ((apl_foreground==true)||((verbose==true))) { + time_t curtime; + char logtime[30]; + + curtime=time((long *)0); + (void) strftime(logtime,sizeof(logtime),"%H:%M:%S",localtime(&curtime)); + (void) fprintf(stderr,"%s %s\n",logtime,strloc); + (void) fflush(stderr); + } + else { + (void) syslog(TRALOG,"%s\n",strloc); + } + (void) free(strloc); + va_end(args); + } +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to display an argv list */ +/* */ +/************************************************/ +void apl_argvtrace(const int dlevel,const char *fmt,char *argv[]) + +{ +if ((debug>=dlevel)&&(argv[0]!=(char *)0)) { + register int i; + char *tmp; + + tmp=strdup(argv[0]); + for (i=1;argv[i]!=(char *)0;i++) { + char *strloc; + + (void) asprintf(&strloc,"%s %s",tmp,argv[i]); + (void) free(tmp); + tmp=strloc; + } + (void) apl_alert(dlevel,fmt,tmp); + (void) free(tmp); + } +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to 'compute' a new base */ +/* according the current directory */ +/* return a newly allocated memory */ +/* */ +/************************************************/ +char *apl_mkbase(char *newbase) + +{ +char *ptr; + +ptr=(char *)0; +switch (newbase[0]) { + case '.' : { + char curdir[512]; + char newpath[1000]; + + if (getcwd(curdir,sizeof(curdir))!=(char *)0) { + (void) snprintf(newpath,sizeof(newpath),"%s/%s",curdir,newbase); + if (chdir(newpath)<0) { + (void) apl_alert(0,"Unable to reach directory <%s>",newpath); + break; /*immediat exit */ + } + (void) getcwd(newpath,sizeof(newpath)); + if (chdir(curdir)<0) { + (void) apl_alert(0,"Unable to reach directory <%s>",curdir); + break; /*immediat exit */ + } + ptr=strdup(newpath); + } + } + break; + case '/' : + ptr=strdup(newbase); + break; + default : + break; + } +if (ptr==(char *)0) { + (void) apl_alert(0,"Unable to assign new base '%s', immediat exit",newbase); + (void) exit(-1); + } +return ptr; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to 'compute' an application */ +/* directory according dir enum value */ +/* */ +/************************************************/ +char *apl_appdir(DIRENUM dir) + +{ +char *appdir; +char *sysbase; +char *apvers; +char *subdir; + +appdir=(char *)0; +sysbase=" "; /*something impossible */ +apvers=apl_getapvers(); +subdir=""; +switch (dir) { + case (d_null) : + sysbase=""; + apvers=""; + break; + case (d_tmp) : + sysbase="/var/tmp"; + apvers=VZGOT"/"; + break; + case (d_crash) : + sysbase="/var/crash"; + break; + case (d_etc) : + sysbase="/etc"; + break; + case (d_spool) : + sysbase="/var/spool"; + break; + case (d_lock) : + sysbase="/var/lock"; + apvers=VZGOT"/"; + break; + case (d_vzgot) : + sysbase="/var/lib"; + apvers=VZGOT; + subdir="/vzdir"; + break; + case (d_log) : + sysbase="/var/spool"; + subdir="logs"; + break; + case (d_ubin) : + sysbase="/usr/bin"; + apvers=""; + break; + case (d_usbin) : + sysbase="/usr/sbin"; + apvers=""; + break; + case (d_varlib) : + sysbase="/var/lib"; + apvers=VZGOT; + break; + case (d_usrlib) : + sysbase="/usr/lib"; + break; + } +(void) asprintf(&appdir,"%s%s/%s%s",base,sysbase,apvers,subdir); +return appdir; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to set the SIGV signal trap */ +/* purpose is to CORE_DUMP in case we have */ +/* a memory failure of some kind. */ +/* */ +/************************************************/ +void apl_trapsegv(int onoff) + +{ +static struct sigaction oldsa; + +if (onoff==true) { + struct sigaction newsa; + + newsa.sa_flags=0; + newsa.sa_handler=trpmempbls; + (void) sigemptyset(&newsa.sa_mask); + (void) sigaction(SIGSEGV,&newsa,&oldsa); + } +else { + (void) sigaction(SIGSEGV,&oldsa,(struct sigaction *)0); + } +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to prepare a core_dump in */ +/* the right directory. */ +/* */ +/************************************************/ +void apl_core_dump(char *frmt,...) + +{ +va_list args; +char *crashdir; +char *temps; + +va_start(args,frmt); +temps=apl_ascsystime(time((time_t *)0)); +crashdir=apl_appdir(d_crash); +(void) prc_core_dump(crashdir,temps,frmt,args); +va_end(args); +} +/* + +*/ +/************************************************/ +/* */ +/* procedure to set/unset trapped signal */ +/* */ +/************************************************/ +void apl_settrap(int set) + +{ +static struct sigaction oldint; +static struct sigaction oldterm; +static struct sigaction oldquit; +static struct sigaction oldusr1; +static struct sigaction oldusr2; + +static int alldone=false; + +if (set==alldone) { + switch (set) { + case true : + (void) apl_core_dump("apl_settrap already set"); + break; + case false : + (void) apl_core_dump("apl_settrap not previously set"); + break; + default : + (void) apl_core_dump("apl_settrap unproper set value"); + break; + } + } +(void) apl_trapsegv(set); +if (set==true) { + struct sigaction newsa; + + newsa.sa_flags=0; + newsa.sa_handler=trapsig; + (void) sigaction(SIGUSR2,&newsa,&oldusr2); + (void) sigaction(SIGUSR1,&newsa,&oldusr1); + (void) sigaction(SIGINT,&newsa,&oldint); + (void) sigaction(SIGTERM,&newsa,&oldterm); + (void) sigaction(SIGQUIT,&newsa,&oldquit); + } +else { + (void) sigaction(SIGQUIT,&oldquit,(struct sigaction *)0); + (void) sigaction(SIGTERM,&oldterm,(struct sigaction *)0); + (void) sigaction(SIGINT,&oldint,(struct sigaction *)0); + (void) sigaction(SIGUSR1,&oldusr1,(struct sigaction *)0); + (void) sigaction(SIGUSR2,&oldusr2,(struct sigaction *)0); + } +alldone=set; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to set a string to lower case */ +/* only. */ +/* */ +/************************************************/ +char *apl_strtolower(char *str) + +{ +if (str!=(char *)0) { + register char *ptr; + + for (ptr=str;*ptr!='\000';ptr++) + *ptr=(char)tolower((int)*ptr); + } +return str; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure extract line from a file, */ +/* forget about any line starting with */ +/* carcom character (if carcom character */ +/* not null). */ +/* Doesn't return the '\r' and '\n' */ +/* character. */ +/* */ +/************************************************/ +char *apl_getstr(FILE *fichier,char *str,u_int taille,char carcom) + +{ +char *strloc; + +(void) memset(str,'\000',taille); +while ((strloc=fgets(str,taille,fichier))!=(char *)0) { + char *ptrloc; + + if (carcom!='\000') { + if (str[0]==carcom) + continue; + ptrloc=str; + while ((ptrloc=strchr(ptrloc,carcom))!=(char *)0) { + if (*(ptrloc-1)=='\\') { + (void) memmove(ptrloc-1,ptrloc,strlen(ptrloc)+1); + ptrloc++; + } + else { + *ptrloc='\000'; + break; + } + } + } + ptrloc=strloc+strlen(strloc); + while (ptrloc!=(char *)0) { + ptrloc--; + switch (*ptrloc) { + case '\n' : + case '\r' : + *ptrloc='\000'; + break; + default : + ptrloc=(char *)0; + break; + } + } + break; + } +return strloc; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to application+version name */ +/* */ +/************************************************/ +char *apl_getapvers() + +{ +static char *apvers=(char *)0; + +if (apvers==(char *)0) { + static char apinfo[50]; + + char *ptr; + char version[30]; + + (void) strcpy(version,apl_getvers()); + if ((ptr=strchr(version,'-'))!=(char *)0) + *ptr='\000'; + (void) snprintf(apinfo,sizeof(apinfo),"%s-%s/",appname,version); + apvers=apinfo; + } +return apvers; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to convert a string to a code,*/ +/* remaining of the string is copy at the */ +/* beginning. */ +/* Return a pointer to table, never a NULL */ +/* pointer unless the table itself is NULL */ +/* */ +/************************************************/ +VOCTYP *apl_getvoca(const VOCTYP *table,char *str) + +{ +VOCTYP *voc; + +voc=(VOCTYP *)0; +if (table!=(VOCTYP *)0) { + int i; + char *sptr; + + sptr=str; + while (isspace(*sptr)!=0) + sptr++; + for (i=0;table[i].key!=(char *)0;i++) { + int max; + + max=strlen(table[i].key); + if (strncasecmp(table[i].key,sptr,max)==0) { + if ((sptr[max]!='\000')&&(isalnum(sptr[max])!=0)) + continue;/*it is not the right word */ + sptr+=max; + while (isspace(*sptr)!=0) + sptr++; + (void) memmove(str,sptr,strlen(sptr)+1); + voc=(VOCTYP *)(table+i); + break; + } + } + if (voc==(VOCTYP *)0) + voc=(VOCTYP *)(table+i);/*return the "unknown" info */ + } +return voc; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to remove crlf and space AT */ +/* the string end. */ +/* Remove space at the string start too. */ +/* */ +/************************************************/ +char *apl_cleanstring(char *str) + +{ +if (str!=(char *)0) { + register int taille; + register char *ptr; + + taille=strlen(str); + ptr=str+taille-1; + while (taille>0) { + if ((*ptr=='\n') || (*ptr=='\r') || (*ptr==' ')) { + *ptr='\000'; + ptr--; + taille--; + continue; + } + break; + } + ptr=str; + while (isblank(*ptr)!=0) + ptr++; + if (str!=ptr) + (void) memmove(str,ptr,strlen(ptr)+1); + } +return str; +} diff --git a/lib/subapl.h b/lib/subapl.h new file mode 100644 index 0000000..f7d052a --- /dev/null +++ b/lib/subapl.h @@ -0,0 +1,112 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* Define sub level procedure needed by */ +/* the application. */ +/* */ +/************************************************/ +#ifndef SUBAPL +#define SUBAPL +#include +#include +#include +#include "lowtyp.h" + + +/*vzboot application name */ +#define VZGOT "vzgot" +/*vzboot current application revision level */ +#define VZBVERS "$Revision: 0.84.0.0 $" + + +/*transit subdirectory name */ +#define TSUFFIX "-S" + +/*defining application directory */ +typedef enum { + d_tmp, /*directory /tmp */ + d_crash, /*the crash directory */ + d_etc, /*directory is /etc */ + d_ubin, /*directory /usr/bin */ + d_usbin, /*directory /usr/sbin */ + d_usrlib, /*directory /usr/lib */ + d_varlib, /*directory /var/lib */ + d_spool, /*spool directory */ + d_log, /*logs directory */ + d_lock, /*locking directory */ + d_vzgot, /*application main dir */ + d_null /*no directoy specified */ + }DIRENUM; + +typedef struct { /*vocable table type */ + int code; /*code value */ + const char *key;/*key code */ + const void *ptr;/*pay load */ + }VOCTYP; + +/*Signal flag definition */ +extern int sigterm; +extern int sigquit; +extern int sigint; + +/*application current version number */ +extern const char *curvers; +/*application working base directory */ +extern char *base; +/*application name */ +extern char *appname; +/*application debug level */ +extern int debug; +/*application verbosity level */ +extern int verbose; +/*application working mode foreground/background*/ +extern int apl_foreground; + +extern int apl_isdir(char *dirpath); +extern char *apl_freestr(char *str); +extern char *apl_getvers(); +extern u_long apl_getmillisec(); +extern char *apl_uniquename(unsigned int seq); +extern u_long apl_date(time_t curtime); +extern char *apl_ascsystime(time_t curtime); +extern char *apl_ascsysdate(time_t curtime); +extern char *apl_ascsysdatetime(time_t curtime); +extern char *apl_ascsysstamp(time_t curtime); +extern time_t apl_datetimesysasc(char *strdate,char *strtime); +extern void apl_alert(const int dlevel,const char *fmt,...); +extern void apl_argvtrace(const int dlevel,const char *fmt,char *argv[]); +extern char *apl_mkbase(char *newbase); +extern char *apl_appdir(DIRENUM dir); +extern void apl_trapsegv(int onoff); +extern void apl_core_dump(char *frmt, ...); +extern void apl_settrap(int set); +extern char *apl_strtolower(char *str); +extern char *apl_getstr(FILE *fichier,char *str,u_int taille,char carcom); +extern int apl_createdirs(char *dirname); +extern char *apl_getapvers(); +extern VOCTYP *apl_getvoca(const VOCTYP *table,char *str); +extern char *apl_cleanstring(char *str); +#endif diff --git a/lib/subprc.c b/lib/subprc.c new file mode 100644 index 0000000..e177f6a --- /dev/null +++ b/lib/subprc.c @@ -0,0 +1,261 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* SUBPRC: */ +/* take care of all low level process */ +/* handling. */ +/* */ +/************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "dbgmem.h" +#include "lowtyp.h" +#include "utlvec.h" +#include "subprc.h" + +#define DEVNULL "/dev/null" + +/*Process command override structure (proc) */ +typedef struct { + int max; /*title max size */ + char **newargv; /*newly set argv list */ + char *title; /*title storage area */ + }TITLTYP; + +/*storage area for /proc title display */ +static TITLTYP *title=(TITLTYP *)0; +/* + +*/ +/************************************************/ +/* */ +/* Procedure to catch a SIGALRM signal */ +/* */ +/************************************************/ +static void trppace(int sig) + +{ +#define OPTR "subprc.c:trppace," + +static u_long tics=(u_long)0; + +switch (sig) { + case SIGALRM : + tics++; + break; + default : + (void) fprintf(stderr,"%s Unexpected signal <%s> received\n", + OPTR,sys_siglist[sig]); + (void) fflush(stderr); + break; + } +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to free used title memory */ +/* */ +/************************************************/ +char **prc_cleantitle() + +{ +if (title!=(TITLTYP *)0) { + title->newargv=(char **)vec_freelstlst((void **)title->newargv,VECFREE); + if (environ!=(char **)0) { + int i; + + for (i=0;environ[i]!=(char *)0;i++) { + (void) free(environ[i]); + environ[i]=(char *)0; + } + (void) free(environ); + environ=(char **)0; + } + (void) free(title); + title=(TITLTYP *)0; + } +return (char **)0; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to find and limit space to */ +/* be used as status information available */ +/* from proc (ps ax) */ +/* */ +/************************************************/ +char **prc_preptitle(int argc,char *argv[],char *env[]) + +{ +extern char **environ; + +char *lastend; + +lastend=(char *)0; +(void) prc_cleantitle(); +title=(TITLTYP *)calloc(1,sizeof(TITLTYP)); +if (argv!=(char **)0) { + int i; + + title->title=argv[0]; + title->newargv=(char **)vec_addlstlst((void **)title->newargv,(void *)strdup(argv[0])); + for (i=1;argv[i]!=(char *)0;i++) { + char *valeur; + + lastend=argv[i]+strlen(argv[i]); + valeur=strdup(argv[i]); + title->newargv=(char **)vec_addlstlst((void **)title->newargv,(void *)valeur); + argv[i]=(char *)0; + } + } +if (env!=(char **)0) { + int i; + + environ=(char **)0; + for (i=0;env[i]!=(char *)0;i++) { + char *valeur; + + lastend=env[i]+strlen(env[i]); + valeur=strdup(env[i]); + (void) putenv(valeur); + } + } +title->max=lastend-title->title; +return title->newargv; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to update title information. */ +/* title information is available via the */ +/* "ps" command. */ +/* */ +/************************************************/ +void prc_settitle(const char *fmt,...) + +{ +va_list args; + +va_start(args,fmt); +if ((title!=(TITLTYP *)0)&&(title->title!=(char *)0)) { + (void) bzero(title->title,title->max); + (void) vsnprintf(title->title,title->max,fmt,args); + } +va_end(args); +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to put a process in background*/ +/* mode. */ +/* */ +/************************************************/ +void prc_divedivedive(int foreground) + +{ +#define OPDI "dbgprc.c:prc_divedivedive," + +if (foreground==0) { + switch (fork()) { + case -1 : + (void) fprintf(stderr,"%s, Unable to dive! (error=<%s>)", + OPDI,strerror(errno)); + /*lets continue if foregorund mode */ + break; + case 0 : + /*we are now in background mode */ + if (foreground==0) /*always */ + (void) setsid(); + break; + default : + /*waiting for ballast to fill up :-}} */ + (void) sleep(1); + (void) exit(0); /*just exit */ + break; /*never reached */ + } + } +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to start or stop a 'Pacemaker'*/ +/* within the application. */ +/* */ +/************************************************/ +void prc_pace(u_long millisec,int onoff) + +{ +int static done=false; +struct sigaction oldsa; + +if (onoff==true) { + if (done==false) { + struct sigaction newsa; + struct itimerval period; + + newsa.sa_flags=0; + newsa.sa_handler=trppace; + (void) sigemptyset(&newsa.sa_mask); + (void) sigaction(SIGALRM,&newsa,&oldsa); + period.it_value.tv_sec=millisec/1000; + period.it_value.tv_usec=millisec*1000; + period.it_interval.tv_sec=period.it_value.tv_sec; + period.it_interval.tv_usec=period.it_value.tv_usec; + (void) setitimer(ITIMER_REAL,&period,(struct itimerval *)0); + done=true; + } + } +else { + if (done==true) { + struct itimerval period; + + period.it_value.tv_sec=0; + period.it_value.tv_usec=0; + period.it_interval.tv_sec=period.it_value.tv_sec; + period.it_interval.tv_usec=period.it_value.tv_usec; + (void) setitimer(ITIMER_REAL,&period,(struct itimerval *)0); + (void) sigaction(SIGALRM,&oldsa,(struct sigaction *)0); + done=false; + } + } +} diff --git a/lib/subprc.h b/lib/subprc.h new file mode 100644 index 0000000..e33c986 --- /dev/null +++ b/lib/subprc.h @@ -0,0 +1,43 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* SUBPRC: */ +/* take care of all low level process */ +/* handling. */ +/* */ +/************************************************/ +#include +#include +#ifndef SUBPRC +#define SUBPRC +#include + +extern char **prc_cleantitle(); +extern char **prc_preptitle(int argc,char *argv[],char *env[]); +extern void prc_settitle(const char *fmt,...); +extern void prc_divedivedive(int foreground); +extern void prc_pace(u_long millisec,int onoff); +#endif diff --git a/lib/unicnt.c b/lib/unicnt.c new file mode 100644 index 0000000..a16d0d9 --- /dev/null +++ b/lib/unicnt.c @@ -0,0 +1,837 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* UNICNT: */ +/* */ +/************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "lowtyp.h" +#include "dbgmem.h" +#include "subapl.h" +#include "unicnt.h" + +/*container filesystem */ +#define ROOTFS "rootfs" /*container root*/ +#define OLDROOT ".oldroot" /*for pivot_root*/ +#define CLONPID "first.pid" /*cont process 1*/ +#define MTAB "/etc/mtab" /*mtab file */ +/* + +*/ +/************************************************/ +/* */ +/* Defining pivot_root system call */ +/* */ +/************************************************/ +static int pivot_root(const char * new_root,const char * put_old) + +{ +#ifndef __NR_pivot_root +#pragma message ("the pivot_root syscall is not available within \"sys/syscall.h\"") +#pragma message ("-> The pivot_root system call will generate an alert") +(void) apl_alert(0,"%s need the pivot_root system call!!!.",appname); +errno=ENOSYS; +return -1; +#else +return(syscall(__NR_pivot_root, new_root, put_old)); +#endif +} +/* + +*/ +/************************************************/ +/* */ +/* Returning the container path. */ +/* contpath array is dynamically assigned */ +/* need to be freed when not need anymore. */ +/* */ +/************************************************/ +static char *getcontpath(char *contname) + +{ +char *contpath; +char *vzpath; + +contpath=(char *)0; +vzpath=apl_appdir(d_vzgot); +(void) asprintf(&contpath,"%s/%s",vzpath,contname); +(void) free(vzpath); +return contpath; +} +/* + +*/ +/************************************************/ +/* */ +/* Check is the container is here with */ +/* all needed parts. */ +/* */ +/************************************************/ +int cnt_iscontgood(char *contname) + +{ +int isgood; +char *contpath; +int phase; +int proceed; + +isgood=true; +phase=0; +proceed=true; +contpath=getcontpath(contname); +while (proceed==true) { + switch (phase) { + case 0 : /*is container existing?*/ + if (contpath!=(char *)0) {/*always. */ + char *rootpath; + + (void) asprintf(&rootpath,"%s/%s",contpath,ROOTFS); + if (apl_isdir(rootpath)<0) { + (void) apl_alert(0,"%s, rootfs directory missing within container \"cont\" directory", + appname,contname); + isgood=false; + phase=999; /*trouble trouble */ + } + (void) free(rootpath); + } + break; + case 1 : /*check/make oldroot dir*/ + if (contpath!=(char *)0) {/*always. */ + char *oldpath; + + (void) asprintf(&oldpath,"%s/%s",contpath,OLDROOT); + if (apl_isdir(oldpath)<0) { + if (mkdir(oldpath,0700)<0) { + (void) apl_alert(0,"%s, unable to make %s directory for container <%s> (error=%s)", + appname,OLDROOT,contname,strerror(errno)); + isgood=false; + phase=999; /*trouble trouble */ + } + } + (void) free(oldpath); + } + break; + default : /*SAFE Guard */ + proceed=false; + break; + } + phase++; + } +(void) free(contpath); +return isgood; +} +/* + +*/ +/************************************************/ +/* */ +/* procedure to set an initial mtab */ +/* contents WITHIN the clone rootfs */ +/* */ +/************************************************/ +static int setmtab(char *contname) + +{ +int done; +FILE *fichier; +int phase; +int proceed; + +done=false; +fichier=(FILE *)0; +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : /*removing mtab file */ + if (unlink(MTAB)<0) { + switch (errno) { + case ENOENT :/* file not existing:-}*/ + break; + default : + (void) apl_alert(0,"%s, Unable to remove %s from container <%s> rootfs (error=<%s>)", + appname,MTAB,contname,strerror(errno)); + phase=999; /*trouble trouble */ + break; + } + } + break; + case 1 : /*creating new MTAB file*/ + if ((fichier=fopen(MTAB,"w"))==(FILE *)0) { + (void) apl_alert(0,"%s, Unable to create %s within container <%s> rootfs (error=<%s>)", + appname,MTAB,contname,strerror(errno)); + phase=999; /*trouble trouble */ + } + break; + case 2 : /*inserting contents */ + if (fprintf(fichier,"%s / roofs rw 0 0\n",appname)<0) { + (void) apl_alert(0,"%s, Unable to write %s file in container <%s> (error=<%s>)", + appname,MTAB,contname,strerror(errno)); + phase=999; /*trouble trouble */ + } + (void) fclose(fichier); + break; + case 3 : /*everything fine */ + done=true; + break; + default : /*SAFE Guard */ + proceed=false; + break; + } + phase++; + } +return done; +} +/* + +*/ +/************************************************/ +/* */ +/* procedure to pivot the container root */ +/* file system. */ +/* */ +/************************************************/ +int cnt_pivot(int foreground,char *contname) + +{ +int done; +char *contpath; +int phase; +int proceed; + +done=false; +contpath=getcontpath(contname); +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : /*binding container file*/ + if (mount(contpath,contpath,0,MS_BIND,0)<0) { + (void) apl_alert(0,"%s, unable to bind container <%s> directory (error=%s)", + appname,contname,strerror(errno)); + phase=999; /*trouble trouble */ + } + break; + case 1 : /*moving to rootfs */ + (void) cnt_setstdio(foreground,contname,"container.log"); + if (chdir(contpath)<0) { + (void) apl_alert(0,"%s, unable to reach container <%s> directory (error=%s)", + appname,contname,strerror(errno)); + phase=999; /*trouble trouble */ + } + break; + case 2 : /*moving to rootfs */ + if (pivot_root(".",OLDROOT)<0) { + (void) apl_alert(0,"%s, unable to pivot container <%s> root (error=%s)", + appname,contname,strerror(errno)); + phase=999; /*trouble trouble */ + } + break; + case 3 : /*umounting previous fs */ + if (umount2(OLDROOT,MNT_DETACH)<0) { + (void) apl_alert(0,"%s, unable to unmount container <%s> oldroot (error=%s)", + appname,contname,strerror(errno)); + phase=999; /*trouble trouble */ + } + break; + case 4 : /* chrooting to rootfs */ + if (chdir(ROOTFS)<0) { + (void) apl_alert(0,"%s, unable to reach container <%s> rootfs (error=%s)", + appname,contname,strerror(errno)); + phase=999; /*trouble trouble */ + } + break; + case 5 : /* everything fine */ + if (chroot(".")<0) { + (void) apl_alert(0,"%s, unable to rootfs container <%s> (error=%s)", + appname,contname,strerror(errno)); + phase=999; /*trouble trouble */ + } + break; + case 6 : /* everything fine */ + (void) setmtab(contname); /*initiat mtab */ + (void) fprintf(stdout,"%s container chroot done\n",apl_ascsystime(time((time_t *)0))); + (void) fflush(stdout); + done=true; + break; + default : /*SAFE Guard */ + proceed=false; + break; + } + phase++; + } +(void) free(contpath); +return done; +} +/* + +*/ +/************************************************/ +/* */ +/* procedure to set a file with the clone */ +/* ip number. */ +/* */ +/************************************************/ +int cnt_setclonepid(char *contname,pid_t cpid) + +{ +int done; +FILE *fichier; +char *filename; +char *contpath; +int phase; +int proceed; + +done=false; +fichier=(FILE *)0; +filename=(char *)0; +contpath=getcontpath(contname); +(void) asprintf(&filename,"%s/%s",contpath,CLONPID); +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : /*opening the file */ + if ((fichier=fopen(filename,"w"))==(FILE *)0) { + (void) apl_alert(0,"%s, Unable to open pidfile <%s> (error=<%s>)", + appname,filename,strerror(errno)); + phase=999; /*trouble trouble */ + } + break; + case 1 : /*writing PID in it */ + if (fprintf(fichier,"%05d\n",cpid)<0) { + (void) apl_alert(0,"%s, Unable to write pidfile in container <%s> (error=<%s>)", + appname,contname,strerror(errno)); + phase=999; /*trouble trouble */ + } + (void) fclose(fichier); + break; + case 2 : /*everything fine */ + done=true; + break; + default : /*SAFE Guard */ + proceed=false; + break; + } + phase++; + } +(void) free(filename); +(void) free(contpath); +return done; +} +/* + +*/ +/************************************************/ +/* */ +/* procedure to get the clone pid stored */ +/* within the clonpid file */ +/* */ +/************************************************/ +pid_t cnt_getclonepid(char *contname) + +{ +pid_t clonepid; +FILE *fichier; +char *filename; +char *contpath; + +clonepid=(pid_t)0; +contpath=getcontpath(contname); +(void) asprintf(&filename,"%s/%s",contpath,CLONPID); +if ((fichier=fopen(filename,"r"))!=(FILE *)0) { + char strloc[80]; + + (void) fgets(strloc,sizeof(strloc)-1,fichier); + (void) sscanf(strloc,"%d",&clonepid); + (void) fclose(fichier); + } +(void) free(filename); +(void) free(contpath); +return clonepid; +} +/* + +*/ +/************************************************/ +/* */ +/* procedure to remove the file with the */ +/* clone pid. */ +/* */ +/************************************************/ +int cnt_rmclonepid(char *contname) + +{ +int done; +char *filename; +char *contpath; + +done=true; +filename=(char *)0; +contpath=getcontpath(contname); +(void) asprintf(&filename,"%s/%s",contpath,CLONPID); +if (unlink(filename)<0) { + (void) apl_alert(0,"%s, Unable to remove pidfile in container <%s> (error=<%s>)", + appname,contname,strerror(errno)); + done=false; + } +(void) free(filename); +(void) free(contpath); +return done; +} +/* + +*/ +/************************************************/ +/* */ +/* procedure to initialize the HOST side */ +/* */ +/************************************************/ +int cnt_initscript(char *scriptname,const char *fmt,...) + +{ +#define BSIZE 2048 + +int status; +va_list args; +FILE *canal; +char *varlibpath; +char *parmlst; +char *cmd; +int phase; +int proceed; + +status=0; +va_start(args,fmt); +canal=(FILE *)0; +varlibpath=apl_appdir(d_varlib); +(void) vasprintf(&parmlst,fmt,args); +(void) asprintf(&cmd,"%s/shell/%s %s",varlibpath,scriptname,parmlst); +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : /*opening pip channel */ + if ((canal=popen(cmd,"r"))==(FILE *)0) { + (void) apl_alert(0,"%s, Unable to pipe cmd <%s> (error=<%s>)", + appname,cmd,strerror(errno)); + status=1; + phase=999; /*trouble trouble */ + } + break; + case 1 : /*do we have feed back */ + if (canal!=(FILE *)0) { /*always */ + char buffer[BSIZE]; + + while (fgets(buffer,BSIZE,canal)!=(char *)0) { + (void) apl_cleanstring(buffer); + if ((debug>0)&&(verbose==true)) + (void) apl_alert(0,"%s, pipe say: <%s>",appname,buffer); + else { + (void) fprintf(stdout,"%s\n",buffer); + (void) fflush(stdout); + } + } + } + break; + case 2 : /*closing pip */ + status=pclose(canal);/*get pipe status */ + break; + default : /*SAFE Guard */ + proceed=false; + break; + } + phase++; + } +(void) free(cmd); +(void) free(parmlst); +(void) free(varlibpath); +va_end(args); +return status; +} +/* + +*/ +/************************************************/ +/* */ +/* procedure to extract the container */ +/* architecture available in the 'arch' */ +/* file. */ +/* */ +/************************************************/ +char *cnt_getarch(char *contname) + +{ +static char *availarch[]={ + "i386","i686","x86_64",(char *)0 + }; + +char *arch; +FILE *fichier; +char *contpath; +char *filename; +int phase; +int proceed; +char buffer[200]; + +arch=(char *)0; +fichier=(FILE *)0; +filename=(char *)0; +contpath=getcontpath(contname); +(void) asprintf(&filename,"%s/%s",contpath,"arch"); +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : /*let open the file */ + if ((fichier=fopen(filename,"r"))==(FILE *)0) { + (void) apl_alert(0,"%s Unable to open file <%s> (error=<%s>)", + appname,filename,strerror(errno)); + phase=999; /*trouble trouble */ + } + break; + case 1 : /*reading first line */ + if (apl_getstr(fichier,buffer,sizeof(buffer),'#')==(char *)0) { + (void) apl_alert(0,"%s Unable to read file <%s> (file empty?)", + appname,filename); + phase=999; /*trouble trouble */ + } + (void) fclose(fichier); + break; + case 2 : /*scanning line */ + (void) apl_cleanstring(buffer); + if (strlen(buffer)>0) { /*always? */ + int i; + + for (i=0;availarch[i]!=(char *)0;i++) { + if (strcmp(availarch[i],buffer)==0) { + arch=strdup(availarch[i]); + proceed=false; /*found arch */ + break; + } + } + } + break; + case 3 : /*scanning line */ + (void) apl_alert(0,"%s file <%s>, arch <%s> unknown, setting default", + appname,filename,buffer); + break; + default : /*SAFE Guard */ + proceed=false; + break; + } + phase++; + } +(void) free(filename); +(void) free(contpath); +if (arch==(char *)0) { + arch=strdup(availarch[0]); + } +return arch; +} +/* + +*/ +/************************************************/ +/* */ +/* procedure to extract the container */ +/* distribution type available in the */ +/* 'dist' file. */ +/* */ +/************************************************/ +char *cnt_getdist(char *contname) + +{ +char *dist; +FILE *fichier; +char *contpath; +char *filename; +int phase; +int proceed; +char buffer[200]; + +dist=(char *)0; +fichier=(FILE *)0; +filename=(char *)0; +contpath=getcontpath(contname); +(void) asprintf(&filename,"%s/%s",contpath,"dist"); +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : /*let open the file */ + if ((fichier=fopen(filename,"r"))==(FILE *)0) { + (void) apl_alert(0,"%s Unable to open file <%s> (error=<%s>)", + appname,filename,strerror(errno)); + phase=999; /*trouble trouble */ + } + break; + case 1 : /*reading first line */ + if (apl_getstr(fichier,buffer,sizeof(buffer),'#')==(char *)0) { + (void) apl_alert(0,"%s Unable to read file <%s> (file empty?)", + appname,filename); + phase=999; /*trouble trouble */ + } + (void) fclose(fichier); + break; + case 2 : /*scanning line */ + (void) apl_cleanstring(buffer); + dist=strdup(buffer); + break; + default : /*SAFE Guard */ + proceed=false; + break; + } + phase++; + } +(void) free(filename); +(void) free(contpath); +if (dist==(char *)0) { + dist=strdup("unknown"); + } +return dist; +} +/* + +*/ +/************************************************/ +/* */ +/* procedure to assign a new STDOUT/STDERR */ +/* and close STDIN. Done ONLY if the */ +/* process is in background mode. */ +/* */ +/************************************************/ +void cnt_setstdio(int foreground,char *contname,char *outname) + +{ +#define OPIO "unicnt.c:cnt_setstdio," + +if (foreground==0) { + int newstdout; + int newstderr; + int phase; + int proceed; + char *contpath; + char *filename; + + newstdout=-1; + newstderr=-1; + phase=0; + proceed=true; + contpath=getcontpath(contname); + (void) asprintf(&filename,"%s/%s.stdout",contpath,outname); + while (proceed==true) { + switch (phase) { + case 0 : /*open the new stdout */ + (void) unlink(filename); + if ((newstdout=open(filename,O_CREAT|O_RDWR|O_TRUNC,S_IRUSR|S_IWUSR|S_IRGRP))<0) { + (void) apl_alert(0,"%s, Unable to open <%s> (error=<%s>)", + OPIO,filename,strerror(errno)); + phase=999; /*trouble trouble */ + } + break; + case 1 : /*open the new stderr */ + (void) free(filename); + (void) asprintf(&filename,"%s/%s.stderr",contpath,outname); + (void) unlink(filename); + if ((newstderr=open(filename,O_CREAT|O_RDWR|O_TRUNC,S_IRUSR|S_IWUSR|S_IRGRP))<0) { + (void) apl_alert(0,"%s, Unable to open <%s> (error=<%s>)", + OPIO,filename,strerror(errno)); + (void) close(newstdout); + phase=999; /*trouble trouble */ + } + break; + case 2 : /*duplicating stdout */ + if (dup2(newstdout,1)<0) { + (void) apl_alert(0,"%s, Unable to dup2 stdout (error=<%s>)", + OPIO,strerror(errno)); + (void) close(newstderr); + (void) close(newstdout); + phase=999; + } + break; + case 3 : /*duplicating stderr */ + (void) close(newstdout); + if (dup2(newstderr,2)<0) { + (void) apl_alert(0,"%s, Unable to dup2 stderr (error=<%s>)", + OPIO,strerror(errno)); + (void) close(newstderr); + phase=999; + } + break; + case 4 : /*setting new std */ + if ((stdout=fdopen(1,"w"))==(FILE *)0) { + (void) apl_alert(0,"%s, Unable to fdopen stdout (error=<%s>)", + OPIO,strerror(errno)); + } + if ((stderr=fdopen(2,"w"))==(FILE *)0) { + (void) apl_alert(0,"%s, Unable to fdopen stderr (error=<%s>)", + OPIO,strerror(errno)); + } + (void) fclose(stdin); + break; + case 5 : /*write time stamp */ + (void) fprintf(stdout,"stdout start: %s\n",apl_ascsysdatetime(time((time_t *)0))); + (void) fprintf(stderr,"stderr start: %s\n",apl_ascsysdatetime(time((time_t *)0))); + (void) fflush(stdout); + (void) fflush(stderr); + break; + default : /*SAFE Guard */ + proceed=false; + break; + } + phase++; + } + (void) free(filename); + (void) free(contpath); + } +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to wait for entry on the */ +/* container console and forward it */ +/* on the Master_container console file. */ +/* A Management expiration is done */ +/* according time. */ +/* */ +/************************************************/ +int cnt_mstconsole(char *contname,pid_t cntpid) + +{ +#define OPCO "unicnt.c:cnt_console," + +#define RLX 5 /*number of sec */ +int status; +int nbr; +int cconsole; +int mconsole; +struct timeval relax; +fd_set reading; +char *contpath; +char *filename; +int phase; +int proceed; +char buffer[1000]; + +status=0; +nbr=0; +cconsole=0; +mconsole=0; +relax.tv_sec=RLX; /*sec relax time */ +relax.tv_usec=0; +FD_ZERO(&reading); +contpath=getcontpath(contname); +(void) asprintf(&filename,"%s/%s",contpath,"console"); +phase=0; +proceed=true; +while (proceed==true) { + switch (phase) { + case 0 : /*opening the M-Console*/ + if ((mconsole=open(filename,O_CREAT|O_WRONLY|O_TRUNC,S_IRUSR|S_IWUSR))<0) { + (void) apl_alert(0,"%s, Unable to open mconsole <%s> (error=<%s>)", + OPCO,filename,strerror(errno)); + phase=999; + status=-1; + } + break; + case 1 : /*opening the C-Console*/ + (void) free(filename); + (void) asprintf(&filename,"%s/rootfs/dev/%s",contpath,"console"); + if ((cconsole=open(filename,O_RDWR|O_ASYNC))<0) { + (void) apl_alert(0,"%s, Unable to open cconsole <%s> (error=<%s>)", + OPCO,filename,strerror(errno)); + (void) close(mconsole); + phase=999; + status=-1; + } + break; + case 2 : /*waiting event */ + relax.tv_sec=RLX; /*sec relax time */ + relax.tv_usec=0; + FD_ZERO(&reading); + FD_SET(cconsole,&reading); + switch ((nbr=select(cconsole+1,&reading,(fd_set *)0,(fd_set *)0,&relax))) { + case -1 : + switch (errno) { + case EINTR: /*received a signal, lets see...*/ + break; /*getting out fast */ + default : + (void) apl_alert(0,"%s, unexpected select event (error=<%s>)", + OPCO,strerror(errno)); + break; + } + break; + case 0 : /*timeout child lost ? */ + switch (waitpid(cntpid,0,WNOHANG)) { + case -1 : /*exiting */ + (void) apl_alert(0,"Unexpect error on waitpid (error=<%s>)",strerror(errno)); + status=-1; + break; + case 0 : /*process still up! */ + phase--; /*lets wait for console */ + break; + default : /*process exited! */ + /*going to next phase */ + break; + } + break; + default : /*data ready in cconsole*/ + if ((nbr=read(cconsole,buffer,sizeof(buffer)))>0) { + (void) write(mconsole,buffer,nbr); + } /*forwarded to mconsole */ + phase--; /*stay put on phase */ + break; + } + break; + case 3 : /*closing console */ + (void) close(mconsole); + (void) close(cconsole); + break; + default : /*SAFE Guard */ + proceed=false; + break; + } + phase++; + } +(void) free(filename); +(void) free(contpath); +return status; +} diff --git a/lib/unicnt.h b/lib/unicnt.h new file mode 100644 index 0000000..89809b2 --- /dev/null +++ b/lib/unicnt.h @@ -0,0 +1,43 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* Define all routine to handle container */ +/* struture and access. */ +/* */ +/************************************************/ +#ifndef UNICNT +#define UNICNT +extern int cnt_iscontgood(char *contname); +extern int cnt_pivot(int foreground,char *contname); +extern int cnt_setclonepid(char *contname,pid_t cpid); +extern pid_t cnt_getclonepid(char *contname); +extern int cnt_rmclonepid(char *contname); +extern int cnt_initscript(char *scriptname,const char *fmt,...); +extern char *cnt_getarch(char *contname); +extern char *cnt_getdist(char *contname); +extern void cnt_setstdio(int foreground,char *contname,char *outname); +extern int cnt_mstconsole(char *contname,pid_t cntpid); +#endif diff --git a/lib/unilck.c b/lib/unilck.c new file mode 100644 index 0000000..eb2cb2d --- /dev/null +++ b/lib/unilck.c @@ -0,0 +1,121 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* UNILCK: */ +/* Take Care of all process locking */ +/* function. */ +/* */ +/************************************************/ +#include +#include +#include +#include +#include +#include "lowtyp.h" +#include "dbgmem.h" +#include "utlprc.h" +#include "subapl.h" +#include "unilck.h" + +/*Application locking directory */ +#define LOCKEXT "-lock" /*lock file extension */ + +/* + +*/ +/************************************************/ +/* */ +/* procedure to set/unset a lock */ +/* return true if successful, */ +/* false otherwise. */ +/* */ +/************************************************/ +int lck_locking(const char *ident,int lock,int tentative) + +{ +int done; +char *dlock; +char *lockname; + +done=false; +dlock=apl_appdir(d_lock); +(void) asprintf(&lockname,"%s%s%s",dlock,ident,LOCKEXT); +if (lock==LCK_LOCK) { + (void) apl_alert(9,"Request locking <%s>",lockname); + while (tentative>0) { + int handle; + + tentative--; + if ((handle=open(lockname,O_RDWR|O_EXCL|O_CREAT,0640))<0) { + FILE *fichier; + + if ((fichier=fopen(lockname,"r"))!=(FILE *)0) { + int pid; + char strloc[80]; + + (void) fgets(strloc,sizeof(strloc)-1,fichier); + (void) fclose(fichier); + if (sscanf(strloc,"%d",&pid)==1) { + (void) apl_alert(1,"Locking, check %d process active",pid); + if (prc_checkprocess(pid)==false) { + (void) apl_alert(1,"Locking, remove unactive lock"); + (void) unlink(lockname); + } + else { + if (tentative>0) + { + (void) apl_alert(2,"waiting 1 sec to be unlocked"); + (void) sleep(1); + } + } + } + } + continue; + } + else + { + char numid[30]; + + (void) snprintf(numid,sizeof(numid),"%06d\n",getpid()); + (void) write(handle,numid,strlen(numid)); + (void) close(handle); + done=true; + break; + } + } + if (done==false) + (void) apl_alert(0,"Unable to set locking <%s>",lockname); + } +else + { + (void) apl_alert(9,"Request unlocking <%s>",lockname); + (void) unlink(lockname); + done=true; + } +(void) free(lockname); +(void) free(dlock); +return done; +} diff --git a/lib/unilck.h b/lib/unilck.h new file mode 100644 index 0000000..bd9252e --- /dev/null +++ b/lib/unilck.h @@ -0,0 +1,37 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* Define all routine to handle process */ +/* interlocking. */ +/* */ +/************************************************/ +#ifndef UNILCK +#define UNILCK + +#define LCK_UNLOCK 0 /*unlocking request */ +#define LCK_LOCK 1 /*locking requets */ +extern int lck_locking(const char *ident,int lock,int tentative); +#endif diff --git a/lib/utlprc.c b/lib/utlprc.c new file mode 100644 index 0000000..0097e7d --- /dev/null +++ b/lib/utlprc.c @@ -0,0 +1,328 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* Implement very sub level procedure to */ +/* handle process sub function. */ +/* */ +/************************************************/ +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include "dbgmem.h" +#include "lowtyp.h" +#include "utlprc.h" +/* + +*/ +/************************************************/ +/* */ +/* Procedure to catch signal and do what is*/ +/* needed. */ +/* */ +/************************************************/ +static void trpsignal(int sig) + +{ +switch (sig) { + case SIGALRM : + break; + default : + (void) fprintf(stderr,"utlprc.c:trpalrm, Unexpected signal <%s> received", + sys_siglist[sig]); + (void) fflush(stderr); + break; + } +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to display an core_dump */ +/* message and terminate application */ +/* */ +/************************************************/ +void prc_core_dump(char *crashdir,char *temps,const char *fmt,va_list args) + +{ +#define MXSTEP 30 + +va_list ap; +struct rlimit limites; + +va_copy(ap,args); +if (getrlimit(RLIMIT_CORE,&limites)<0) { + (void) fprintf(stderr,"getrlimit error='%s'",strerror(errno)); + } +limites.rlim_cur=limites.rlim_max; +if (setrlimit(RLIMIT_CORE,&limites)<0) { + (void) fprintf(stderr,"setrlimit error='%s'",strerror(errno)); + } +(void) prctl(PR_SET_DUMPABLE,1,0,0,0);/*to allow core-dump */ +if (chdir(crashdir)<0) { + char command[2000]; + char dirdump[1000]; + + (void) snprintf(dirdump,sizeof(dirdump),"%s/coredump/","/tmp"); + (void) snprintf(command,sizeof(command),"mkdir -p %s",dirdump); + (void) system(command); + if (chdir(dirdump)<0) { + (void) abort(); + } + crashdir=dirdump; + } +if (temps!=(char *)0) + (void) fprintf(stderr,"%s ",temps); +(void) vfprintf(stderr,fmt,ap); +(void) fprintf(stderr,"\n"); +(void) fprintf(stderr,"going to CORE DUMP (in %score.%d)\n", + crashdir,getpid()); +(void) fflush(stderr); +(void) sleep(5); /*to avoid crash avalanche */ +(void) abort(); /*doing the abort */ +(void) exit(-1); /*Theoriticaly unreachable */ +} +/* +^L +*/ +/************************************************/ +/* */ +/* Procedure to check if a child process */ +/* is still alive. */ +/* */ +/************************************************/ +int prc_checkprocess(pid_t pid) + +{ +int status; + +status=false; +switch(pid) { + case (pid_t)0 : /*0 means no process */ + status=false; + break; + case (pid_t)1 : /*init process always OK*/ + status=true; + break; + default : /*standard process */ + if (kill(pid,SIGCHECK)==0) + status=true; + break; + } +return status; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to allow exited child process */ +/* to leave the zombie stat. */ +/* */ +/************************************************/ +void prc_nozombie() + +{ +while (waitpid(-1,(int *)0,WNOHANG)>0); +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to add a process number to */ +/* process list */ +/* */ +/************************************************/ +PRCTYP *prc_addtoprc(PRCTYP *plst,pid_t pid) + +{ +register int taille; + +taille=1; +if (plst==(PRCTYP *)0) { + plst=(PRCTYP *)calloc(1,sizeof(PRCTYP)); + plst->pqueue=(pid_t *)calloc(taille,sizeof(pid_t)); + } +plst->pqueue[plst->nbr]=pid; +plst->nbr++; +taille+=plst->nbr; +plst->pqueue=(pid_t *)realloc((void *)plst->pqueue,taille*sizeof(pid_t)); +return plst; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to terminate all child process*/ +/* refered in a process list. if not */ +/* successful 'delay' after SIGTERM try, */ +/* a SIGKILL signal is applied. */ +/* */ +/************************************************/ +PRCTYP *prc_childkill(PRCTYP *prclst,int delay) + +{ +if (prclst!=(PRCTYP *)0) { + pid_t *pid; + int overkill; + int i; + + overkill=false; + pid=prclst->pqueue; + (void) prc_nozombie(); + for (i=0;inbr;i++) { + if (pid[i]<=1) /*no way to kill admin process */ + continue; + if (kill(pid[i],SIGTERM)==0) + overkill=true; + } + while (overkill==true) { + struct timespec timer; + + timer.tv_sec=1; + timer.tv_nsec=0; + overkill=false; + while (nanosleep(&timer,&timer)!=0); + (void) prc_nozombie(); + for (i=0;inbr;i++) { + if (pid[i]<=1) /*no way to kill admin process */ + continue; + if (kill(pid[i],SIGCHECK)==0) + overkill=true; + } + delay--; + if (delay==0) + break; + } + if (overkill==true) { + for (i=0;inbr;i++) { + if (pid[i]<=1) /*no way to kill admin process */ + continue; + if (kill(pid[i],SIGCHECK)==0) { + /*lets kill for sure */ + (void) kill(pid[i],SIGKILL); + (void) fprintf(stderr,"prc_childkill, overkilled process'%05d'\n", + pid[i]); + (void) fflush(stderr); + } + } + } + (void) prc_nozombie(); + (void) free(pid); + (void) free(prclst); + prclst=(PRCTYP *)0; + } +return prclst; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to check exited process among */ +/* a process list, return only process */ +/* nomber still up and running. */ +/* */ +/************************************************/ +PRCTYP *prc_childcheck(PRCTYP *prclst) + +{ +PRCTYP *newprc; + +newprc=(PRCTYP *)0; +if (prclst!=(PRCTYP *)0) { + if (prclst->nbr>0) { + register int i; + + (void) prc_nozombie(); + for (i=0;inbr;i++) { + if (prc_checkprocess(prclst->pqueue[i])==true) { + newprc=prc_addtoprc(newprc,prclst->pqueue[i]); + } + } + } + if (prclst->pqueue!=(pid_t *)0) + (void) free(prclst->pqueue); + (void) free(prclst); + } +return newprc; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to start or stop a 'Pacemaker'*/ +/* within the application. */ +/* */ +/************************************************/ +void prc_setpace(unsigned long millisec,int onoff) + +{ +int static done=false; +struct sigaction oldsa; + +if (onoff==true) { + if (done==false) { + struct sigaction newsa; + struct itimerval period; + + newsa.sa_flags=0; + newsa.sa_handler=trpsignal; + (void) sigemptyset(&newsa.sa_mask); + (void) sigaction(SIGALRM,&newsa,&oldsa); + period.it_value.tv_sec=millisec/1000; + period.it_value.tv_usec=millisec*1000; + period.it_interval.tv_sec=period.it_value.tv_sec; + period.it_interval.tv_usec=period.it_value.tv_usec; + (void) setitimer(ITIMER_REAL,&period,(struct itimerval *)0); + done=true; + } + } +else { + if (done==true) { + struct itimerval period; + + period.it_value.tv_sec=0; + period.it_value.tv_usec=0; + period.it_interval.tv_sec=period.it_value.tv_sec; + period.it_interval.tv_usec=period.it_value.tv_usec; + (void) setitimer(ITIMER_REAL,&period,(struct itimerval *)0); + (void) sigaction(SIGALRM,&oldsa,(struct sigaction *)0); + done=false; + } + } +} diff --git a/lib/utlprc.h b/lib/utlprc.h new file mode 100644 index 0000000..57743da --- /dev/null +++ b/lib/utlprc.h @@ -0,0 +1,51 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* Define utility level procedure to handle*/ +/* process function. */ +/* */ +/************************************************/ +#ifndef UTLPRC +#define UTLPRC +#include + +/*Signal to be send to check if a process is */ +/*still up and running */ +#define SIGCHECK 0 + +typedef struct { + u_int nbr; /*nbr process in queue */ + pid_t *pqueue; /*process queue */ + }PRCTYP; + +extern void prc_core_dump(char *crashdir,char *temps,const char *fmt,va_list args); +extern int prc_checkprocess(pid_t pid); +extern void prc_nozombie(); +extern PRCTYP *prc_addtoprc(PRCTYP *prclst,pid_t pid); +extern PRCTYP *prc_childkill(PRCTYP *prclst,int delay); +extern PRCTYP *prc_childcheck(PRCTYP *prclst); +extern void prc_setpace(unsigned long millisec,int onoff); +#endif diff --git a/lib/utlvec.c b/lib/utlvec.c new file mode 100644 index 0000000..e28d297 --- /dev/null +++ b/lib/utlvec.c @@ -0,0 +1,264 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* Implement utlity level procedure to */ +/* manage linked list */ +/* */ +/************************************************/ +#include +#include +#include "dbgmem.h" +#include "lowtyp.h" +#include "utlvec.h" +/* + +*/ +/************************************************/ +/* */ +/* Procedure to add a payload within */ +/* a vectored list */ +/* */ +/************************************************/ +VPTR *vec_addveclst(VPTR *vptr,void *payload) + +{ +VECLST *node; + +node=(VECLST *)calloc(1,sizeof(VECLST)); +node->payload=payload; +if (vptr==(VPTR *)0) { + vptr=(VPTR *)calloc(1,sizeof(VPTR)); + vptr->vcl=node; + node->nxt=node; + node->prv=node; + } +else { + node->nxt=vptr->vcl; + node->prv=vptr->vcl->prv; + vptr->vcl->prv->nxt=node; + vptr->vcl->prv=node; + } +vptr->numvec++; +return vptr; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to remove on vector from the */ +/* vector list, return the number of */ +/* payload subtracted. */ +/* */ +/************************************************/ +int vec_rmveclst(VPTR **vptr,void *payload) + +{ +register int done; + +done=0; +if (*vptr!=(VPTR *)0) { + register u_int i; + register VECLST *cur; + + for (i=0,cur=(*vptr)->vcl;i<(*vptr)->numvec;i++) { + if (payload==cur->payload) { + register VECLST *prv; + + prv=cur->prv; + (*vptr)->numvec--; + cur->prv->nxt=cur->nxt; + cur->nxt->prv=cur->prv; + (void) free(cur); + cur=prv; + done++; + } + cur=cur->nxt; + } + if ((*vptr)->numvec==0) { + (void) free(*vptr); + *vptr=(VPTR *)0; + } + } +return done; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to free a vector list, */ +/* memory used by payload is freed too. */ +/* */ +/************************************************/ +VPTR *vec_freeveclst(VPTR *vptr,void *(*freepayload)(void *)) + +{ +if (vptr!=(VPTR *)0) { + register u_int i; + register VECLST *cur; + + for (i=0,cur=vptr->vcl->prv;inumvec;i++) { + register VECLST *tofree; + register void *payload; + + tofree=cur; + payload=tofree->payload; + cur=tofree->prv; + (void) free(tofree); + if ((payload!=(void *)0)&&(freepayload!=(void *(*)(void*))0)) + (void) freepayload(payload); + } + (void) free(vptr); + vptr=(VPTR *)0; + } +return vptr; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to count number of element */ +/* within an ordered list. */ +/* */ +/************************************************/ +unsigned int vec_sizelstlst(void **lptr) + +{ +register unsigned int num; + +num=(unsigned int)0; +if (lptr!=(void **)0) { + for (;*lptr!=(void *)0;lptr++,num++); + } +return num; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to add a payload within */ +/* an ordered list */ +/* */ +/************************************************/ +void **vec_addlstlst(void **lptr,void *payload) + +{ +int num; + +num=0; +if (lptr!=(void **)0) { + num=vec_sizelstlst(lptr); + lptr=(void **)realloc(lptr,(num+2)*sizeof(void *)); + } +else + lptr=(void **)calloc(2,sizeof(void *)); +lptr[num]=payload; +lptr[num+1]=(void *)0; +return lptr; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to merge to ordereded list */ +/* second list array definition is freed */ +/* */ +/************************************************/ +void **vec_mrglstlst(void **lptr,void **ladd) + +{ +if (ladd!=(void **)0) { + register unsigned int t1; + register unsigned int t2; + + if (lptr==(void **)0) + lptr=(void **)calloc(1,sizeof(void *)); + t1=vec_sizelstlst(lptr); + t2=vec_sizelstlst(ladd); + lptr=(void **)realloc(lptr,(t1+t2+1)*sizeof(void *)); + (void) memcpy(lptr+t1,ladd,(t2+1)*sizeof(void *)); + (void) free(ladd); + } +return lptr; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to remove one payload from */ +/* within an ordered list */ +/* Return true if success, false otherwise */ +/* */ +/************************************************/ +int vec_rmlstlst(void **lptr,void *payload) + +{ +int success; + +success=false; +if (lptr!=(void **)0) { + for (;*lptr!=(void *)0;lptr++) { + if (success==false) { + if (*lptr==payload) { + success=true; + lptr--; + } + } + else + *lptr=*(lptr+1); + } + } +return success; +} +/* + +*/ +/************************************************/ +/* */ +/* Procedure to remove all payload from */ +/* an ordered list. */ +/* */ +/************************************************/ +void **vec_freelstlst(void **lptr,void *(*freepayload)(void *)) + +{ +if (lptr!=(void **)0) { + register void **p; + + for (p=lptr;*p!=(void *)0;p++) { + if (freepayload!=(void *(*)(void*))0) + *p=freepayload(*p); + } + (void) free(lptr); + lptr=(void **)0; + } +return lptr; +} diff --git a/lib/utlvec.h b/lib/utlvec.h new file mode 100644 index 0000000..9373291 --- /dev/null +++ b/lib/utlvec.h @@ -0,0 +1,60 @@ +/************************************************/ +/* */ +/* Copyright: */ +/* Jean-Marc Pigeon 2009 */ +/* */ +/************************************************/ +/* This program is free software; you can */ +/* redistribute it and/or modify it under the */ +/* terms of the GNU General Public License as */ +/* published by the Free Software Foundation */ +/* version 2 of the License */ +/* */ +/* This program is distributed in the hope that */ +/* it will be useful, but WITHOUT ANY WARRANTY; */ +/* without even the implied warranty of */ +/* MERCHANTABILITY or FITNESS FOR A PARTICULAR */ +/* PURPOSE. See the GNU General Public License */ +/* for more details. */ +/* */ +/* You should have received a copy of the GNU */ +/* General Public License along with this */ +/* program; if not, write to the Free Software */ +/* Foundation, Inc., 51 Franklin Street, */ +/* Fifth Floor, Boston, MA 02110-1301, USA. */ +/************************************************/ +/* */ +/* Define utility level procedure to manage*/ +/* dynamic memory list */ +/* */ +/************************************************/ +#ifndef UTLVEC +#define UTLVEC +#include + +#define VECFREE (void *(*)(void *))free + + +/*Vector list definition */ +/*Doubly-circularly-linked lists */ +typedef struct LIST VECLST; +typedef struct LIST { + void *payload; /*payload */ + VECLST *prv; /*previous node */ + VECLST *nxt; /*next node */ + }VECTOR; + +typedef struct { + u_int numvec; /*number of vector */ + VECLST *vcl; /*vector list */ + }VPTR; + +extern VPTR *vec_addveclst(VPTR *vptr,void *payload); +extern int vec_rmveclst(VPTR **vptr,void *payload); +extern VPTR *vec_freeveclst(VPTR *vptr,void *(*freepayload)(void *)); +extern unsigned int vec_sizelstlst(void **lptr); +extern void **vec_addlstlst(void **lptr,void *payload); +extern void **vec_mrglstlst(void **lptr,void **ltoadd); +extern int vec_rmlstlst(void **lptr,void *payload); +extern void **vec_freelstlst(void **lptr,void *(*freepayload)(void *)); +#endif diff --git a/notes/cont b/notes/cont new file mode 100755 index 0000000..f8b0744 Binary files /dev/null and b/notes/cont differ diff --git a/notes/cont.c b/notes/cont.c new file mode 100644 index 0000000..1cdb9fa --- /dev/null +++ b/notes/cont.c @@ -0,0 +1,84 @@ +#define _GNU_SOURCE +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#define STKSIZE 16386 + +int variable, fd; + +int do_contain() + +{ +(void) fprintf(stdout,"Clone started pid='%d', parent='%d'\n",getpid(),getppid()); +(void) fflush(stdout); +(void) unshare(CLONE_NEWUTS|CLONE_NEWUSER|CLONE_NEWNS|CLONE_FILES|CLONE_FS); +if (mount("/wrk/jail", "/mnt", NULL, MS_BIND, NULL)<0) { + (void) fprintf(stdout,"unable to mount /wrk/jail on mnt error=<%s>\n",strerror(errno)); + (void) fflush(stdout); + (void) exit(1); + } +if (chdir("/mnt")<0) { + (void) fprintf(stdout,"unable to chdir to /wrk/jail error=<%s>\n",strerror(errno)); + (void) fflush(stdout); + (void) exit(1); + } +if (pivot_root(".", "old_root")<0) { + (void) fprintf(stdout,"privot_root error=<%s>\n",strerror(errno)); + (void) fflush(stdout); + (void) exit(1); + } +if (chdir("/")<0) { + (void) fprintf(stdout,"unable to chdir to / error=<%s>\n",strerror(errno)); + (void) fflush(stdout); + (void) exit(1); + } +(void) chroot("."); +if (mount("none", "/proc","proc",0,NULL)<0) { + (void) fprintf(stdout,"mount MOVE error=<%s>\n",strerror(errno)); + (void) fflush(stdout); + (void) exit(1); + } +if (umount2("old_root",MNT_DETACH)<0) { + (void) fprintf(stdout,"Unable to umount old_root error=<%s>\n",strerror(errno)); + (void) fflush(stdout); + (void) exit(1); + } +(void) fprintf(stderr,"Pret 3!\n"); +(void) fflush(stderr); +(void) execl("/bin/bash", NULL); +(void) fprintf(stdout,"Clone completed pid='%d' (UNEXPECTED!!)\n",getpid()); +_exit(0); +} + +int main(int argc, char *argv[]) + +{ +void **child_stack; +pid_t cpid; + +child_stack=(void **)malloc(STKSIZE); +if ((cpid=clone(&do_contain, child_stack+STKSIZE,SIGCHLD|__WCLONE|CLONE_NEWPID|CLONE_NEWNS,NULL))<0) { + (void) fprintf(stdout,"Unable to start container (error=%s)\n",strerror(errno)); + (void) fflush(stdout); + (void) exit(1); + } +if (waitpid(cpid,0,0)<0) { + (void) fprintf(stdout,"Waitpid error (%s)\n",strerror(errno)); + (void) fflush(stdout); + (void) exit(2); + } +(void) free(child_stack); +(void) fprintf(stdout,"Everything done\n"); +(void) fflush(stdout); +return 0; +} + diff --git a/notes/cont.o b/notes/cont.o new file mode 100644 index 0000000..8801a07 Binary files /dev/null and b/notes/cont.o differ diff --git a/shell/Makefile b/shell/Makefile new file mode 100644 index 0000000..ce56807 --- /dev/null +++ b/shell/Makefile @@ -0,0 +1,29 @@ +#-------------------------------------------------------------------- +#Support directory Management +#-------------------------------------------------------------------- +clean : + @ for i in $(SUBDIRS) ; \ + do \ + echo doing "\"$$i $@\"" ; \ + $(MAKE) -s -C $$i $@ ; \ + done + + +sauve : + @ for i in $(SUBDIRS) ; \ + do \ + $(MAKE) -s -C $$i $@ ; \ + done + @ echo doing RCS on $(LOCDIR) + @ ../support/sauver $(SRC) + +#-------------------------------------------------------------------- +SRC= \ + Makefile + +SUBDIRS= \ + +LOCDIR="shell" +#=================================================================== +.PHONY: sauve clean +#-------------------------------------------------------------------- diff --git a/shell/RCS/Makefile,v b/shell/RCS/Makefile,v new file mode 100644 index 0000000..70fe217 --- /dev/null +++ b/shell/RCS/Makefile,v @@ -0,0 +1,137 @@ +head 0.84; +access; +symbols; +locks + jmp:0.84.0.0; strict; +comment @# @; + + +0.84 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.84.0.0; +next 0.83; + +0.83 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.83.0.0; +next ; + +0.83.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next 0.83.0.1; + +0.83.0.1 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + +0.84.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + + +desc +@#-------------------------------------------------------------------- +#Support directory Management +#-------------------------------------------------------------------- +clean : + @@ for i in $(SUBDIRS) ; \ + do \ + echo doing "\"$$i $@@\"" ; \ + $(MAKE) -s -C $$i $@@ ; \ + done + + +sauve : + @@ for i in $(SUBDIRS) ; \ + do \ + $(MAKE) -s -C $$i $@@ ; \ + done + @@ echo doing RCS on $(LOCDIR) + @@ ../support/sauver $(SRC) + +#-------------------------------------------------------------------- +SRC= \ + Makefile + +SUBDIRS= \ + +LOCDIR="shell" +#=================================================================== +.PHONY: sauve clean +#-------------------------------------------------------------------- +@ + + +0.84 +log +@upgrade version +@ +text +@#-------------------------------------------------------------------- +#Support directory Management +#-------------------------------------------------------------------- +clean : + @@ for i in $(SUBDIRS) ; \ + do \ + echo doing "\"$$i $@@\"" ; \ + $(MAKE) -s -C $$i $@@ ; \ + done + + +sauve : + @@ for i in $(SUBDIRS) ; \ + do \ + $(MAKE) -s -C $$i $@@ ; \ + done + @@ echo doing RCS on $(LOCDIR) + @@ ../support/sauver $(SRC) + +#-------------------------------------------------------------------- +SRC= \ + Makefile + +SUBDIRS= \ + +LOCDIR="shell" +#=================================================================== +.PHONY: sauve clean +#-------------------------------------------------------------------- +@ + + +0.84.0.0 +log +@Ratrapage numero de Version +@ +text +@@ + + +0.83 +log +@Creation +#================================================================================= +@ +text +@@ + + +0.83.0.0 +log +@Ratrapage numero de Version +@ +text +@@ + + +0.83.0.1 +log +@Mise en place su GIT +@ +text +@@ diff --git a/shell/vzgot.close b/shell/vzgot.close new file mode 100755 index 0000000..52ac37a --- /dev/null +++ b/shell/vzgot.close @@ -0,0 +1,39 @@ +#! /bin/sh +#---------------------------------------------------- +#shell used to clean the host part (network, cgroup) +#while stopping a vzgot Virtual Host +#This shell is called from the vzgot executable +# +#---------------------------------------------------- +#Syntaxe +#vzgot.open VE_name VE_pid [base_dir] +# VE_name is the container dir name +# VE_pid is the container main process ID as seen +# by the host +# base_dir is this application root directory +# used for devel only. +#---------------------------------------------------- +CONTNAME=$1 +VEPID=$2 +BASE=$3 +#---------------------------------------------------- +if ! [ -f $BASE/etc/vzgot/vzgot_config ] ; then + echo "Missing vzgot config file" + exit 1 #trouble trouble + fi +. $BASE/etc/vzgot/vzgot_config + +#specific container configuration override (if needed) +if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config ] ; then + $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config + fi +#---------------------------------------------------- +#lets cancel all routing +$BASE/$VZLIB/shell/vzgot.net $CONTNAME remove $BASE +#---------------------------------------------------- +#Using cgroup if available and operational +if [ -f $CGROUP/tasks ] ; then + rm -fr $BASE/$VZLIB/vzdir/$CONTNAME/cgroup + rmdir $CGROUP/$VEPID + fi +exit 0 diff --git a/shell/vzgot.create b/shell/vzgot.create new file mode 100755 index 0000000..1860dda --- /dev/null +++ b/shell/vzgot.create @@ -0,0 +1,132 @@ +#! /bin/sh +#---------------------------------------------------- +#shell used to create the root file system for the +#container, incoming file is a tar file to +#insert within the vzgot directory structure +# +#---------------------------------------------------- +#Syntaxe +#vzgot.create VE_name tpl_tar_filename dist arch base_dir +# VE_name is the container dir name +# tpl_tar_filename is the template file name to be used +# dist is the distribution name (fc12, rh7.3, el5.4, etc...) +# arch is the architecture base (i386, x86_64) +# base_dir is this application root directory +# used for devel only. +#---------------------------------------------------- +CONTNAME=$1 +TARFILE=$2 +DIST=$3 +ARCH=$4 +BASE=$5 + +#------------------------------------------------------------------- +#abort procedure +abort () + +{ +echo "$1" +exit 1; +} +#---------------------------------------------------- +#default GETAR value, during the container create +#CAN BE overriden within /etc/vzgot/vzgot_config +#if your template are somewhere else +GETAR="cat /var/lib/vzgot/vztemplate/$TARFILE" +#---------------------------------------------------- +if ! [ -f $BASE/etc/vzgot/vzgot_config ] ; then + abort "Missing vzgot config file" + fi +. $BASE/etc/vzgot/vzgot_config + +#specific container configuration override (if needed) +if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config ] ; then + $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config + fi +#---------------------------------------------------- +if [ -d $BASE/$VZLIB/vzdir/$CONTNAME ] ; then + echo "Container $CONTNAME already existing, must be destroyed first" + abort "Use command \"vzgot destroy $CONTNAME\" to do it" + fi + +#---------------------------------------------------- +#creating Container directory +mkdir -p $BASE/$VZLIB/vzdir/$CONTNAME +if [ ! -z "$LVM" ] ; then + if [ -z "$LVM_SIZE" ] ; then + LVM_SIZE="2G" + fi + VZCONTNAME=`echo $CONTNAME | sed 's/\.//g' | sed 's/-//g'` + lvcreate -L$LVM_SIZE -n$VZCONTNAME $LVM > /dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + abort "vzgot.create, unable to create LVM $VZCONTNAME on volume $LVM" + fi + mke2fs -q -t ext4 -j -L$VZCONTNAME /dev/$LVM/$VZCONTNAME + ret=$? + if [ $ret -ne 0 ]; then + abort "vzgot.create, unable to format LVM $VZCONTNAME with mke2fs" + fi + mount /dev/$LVM/$VZCONTNAME $BASE/$VZLIB/vzdir/$CONTNAME + ret=$? + if [ $ret -ne 0 ]; then + abort "vzgot.create, unable to mount LVM $VZCONTNAME on BASE/$VZLIB/vzdir/$CONTNAME" + fi + echo -e "/dev/$LVM/$VZCONTNAME\t$BASE/$VZLIB/vzdir/$CONTNAME\text4\tdefaults\t0 0" >> /etc/fstab + fi +mkdir -p $BASE/$VZLIB/vzdir/$CONTNAME/rootfs + +#installing template +$GETAR | tar zxCf $BASE/$VZLIB/vzdir/$CONTNAME/rootfs - +ret=$? +if [ $ret -ne 0 ]; then + abort "vzgot.create, Unable to install template file $TPL!" + fi +#---------------------------------------------------- +#duplicating cgroup HOST setting (the limits you +#want to be set to all created container) +cp -ap $BASE/$VZLIB/cgroup.d $BASE/$VZLIB/vzdir/$CONTNAME +#---------------------------------------------------- +#setting the container architecture +echo $ARCH > $BASE/$VZLIB/vzdir/$CONTNAME/arch +#setting the container distribution +echo $DIST > $BASE/$VZLIB/vzdir/$CONTNAME/dist +#---------------------------------------------------- +#cleaning mtab +rm -fr $BASE/$VZLIB/vzdir/$CONTNAME/rootfs/etc/mtab* +#---------------------------------------------------- +#specific configuration according distribution +case "$DIST" in + "rh9" ) + #setting variable LD_ASSUME_KERNEL to help RPM utility + export ENVRPM="LD_ASSUME_KERNEL=2.4.1" + echo "export $ENVRPM" >> $BASE/$VZLIB/vzdir/$CONTNAME/rootfs/etc/bashrc + ;; + "*" ) #nothing to do + ;; + esac +#---------------------------------------------------- +#installing needed RPM +if [ -d $BASE/$VZLIB/RPM/RPMS/$ARCH/$DIST ] ; then + ( + #do we have specific rpm to add to template + cd $BASE/$VZLIB/RPM/RPMS/$ARCH/$DIST + num=`ls -1 *.rpm | wc -l` + if [ $num -ge 1 ] ; then + + VZROOT=$BASE/$VZLIB/vzdir/$CONTNAME/rootfs + CHROOT="/usr/bin/setarch $ARCH /usr/sbin/chroot" + + mkdir $VZROOT/tmp/rpm + cp *.rpm $VZROOT/tmp/rpm + $CHROOT $VZROOT mount -t proc proc /proc + $CHROOT $VZROOT mount -t sysfs sysfs /sys + $CHROOT $VZROOT /bin/bash -c "$ENVRPM rpm -U --quiet tmp/rpm/*.rpm" + $CHROOT $VZROOT umount /sys + $CHROOT $VZROOT umount /proc + fi + ) + fi +#---------------------------------------------------- +#final exit +exit $ret diff --git a/shell/vzgot.destroy b/shell/vzgot.destroy new file mode 100755 index 0000000..b950e89 --- /dev/null +++ b/shell/vzgot.destroy @@ -0,0 +1,53 @@ +#! /bin/sh +#---------------------------------------------------- +#shell used to remove the root file system for a +#container. +# +#---------------------------------------------------- +#Syntaxe +#vzgot.destroy VE_name +# VE_name is the container dir name +# base_dir is this application root directory +# used for devel only. +#---------------------------------------------------- +CONTNAME=$1 +BASE=$2 +#---------------------------------------------------- +if ! [ -f $BASE/etc/vzgot/vzgot_config ] ; then + echo "Missing vzgot config file" + exit 1 #trouble trouble + fi +. $BASE/etc/vzgot/vzgot_config + +#specific container configuration override (if needed) +if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config ] ; then + $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config + fi +#---------------------------------------------------- +if [ ! -d $BASE/$VZLIB/vzdir/$CONTNAME ] ; then + echo "Container $CONTNAME not existing" + exit 1 + fi + +#---------------------------------------------------- +#checking if container is up and running +if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/first.pid ] ; then + echo "Container $CONTNAME is up and running" + echo "Container must be stop first, try \"vzgot shutdown $CONTNAME\"" + exit 2 + fi +#---------------------------------------------------- +if [ ! -z "$LVM" ] ; then + VZCONTNAME=`echo $CONTNAME | sed 's/\.//g' | sed 's/-//g'` + umount $BASE/$VZLIB/vzdir/$CONTNAME + sed -i -e/"vzdir\/$CONTNAME"/d /etc/fstab + lvremove --quiet -f /dev/$LVM/$VZCONTNAME > /dev/null 2>&1 + ret=$? + if [ $ret -ne 0 ]; then + echo "vzgot.destroy, unable to destroy LVM $VZCONTNAME with lvremove" + exit $ret + fi + fi +mv $BASE/$VZLIB/vzdir/$CONTNAME $BASE/$VZLIB/vzdir/$CONTNAME.$$ +rm -fr $BASE/$VZLIB/vzdir/$CONTNAME.$$ & +exit 0 diff --git a/shell/vzgot.fboot b/shell/vzgot.fboot new file mode 100755 index 0000000..7f6b614 --- /dev/null +++ b/shell/vzgot.fboot @@ -0,0 +1,63 @@ +#! /bin/sh +#---------------------------------------------------- +#shell used to prepare container struture, this script +#is called by the vzgot before any root pivot action. +#It is used on the firstboot to prepare all needed file. +#or restructure container. +# +#---------------------------------------------------- +#Syntaxe +#vzgot.fistboot VE_name VE_pid Distrib domain node name ip_list [Base] +# VE_name is the container dir name +# Linux family (RedHat...) +# Domain is the container domainname +# Node is the container hostname +# IP_LIST is an ip list (ip,ip1,ip2,..) used +# to prepare container network +# base_dir is this application root directory +# (used for devel only). +#---------------------------------------------------- +CONTNAME=$1 +FLINUX=$2 +DOMAIN=$3 +NODE=$4 +LSTIP=$5 +BASE=$6 +#---------------------------------------------------- +if ! [ -f $BASE/etc/vzgot/vzgot_config ] ; then + echo "Missing vzgot config file" + exit 1 #trouble trouble + fi +. $BASE/etc/vzgot/vzgot_config + +#specific container configuration override (if needed) +if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config ] ; then + $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config + fi + +#==================================================== +#Main script + +#setting linux family in configuration file +echo "$FLINUX" > $BASE/$VZLIB/vzdir/$CONTNAME/linux + +case "$FLINUX" in + "RedHat" ) + $BASE/$VZLIB/shell/vzgot.fboot.redhat \ + $CONTNAME $NODE $DOMAIN $LSTIP $BASE + ;; + "Debian" ) + $BASE/$VZLIB/shell/vzgot.fboot.debian \ + $CONTNAME $NODE $DOMAIN $LSTIP $BASE + ;; + "*" ) + /bin/echo "<"$FLINUX"> not yet an implemented linux family" + exit 1; + ;; + esac +#---------------------------------------------------- +#setting the container status to "ON" +#used by /etc/init.d/vzgot when hot is booting +echo "BOOT=ON" > $BASE/$VZLIB/vzdir/$CONTNAME/status +#---------------------------------------------------- +exit 0 diff --git a/shell/vzgot.fboot.debian b/shell/vzgot.fboot.debian new file mode 100755 index 0000000..6153c5d --- /dev/null +++ b/shell/vzgot.fboot.debian @@ -0,0 +1,226 @@ +#! /bin/sh +#---------------------------------------------------- +#shell used to prepare container structure, this script +#is called by the vzgot before any root pivot action. +#It is used on the firstboot to prepare all needed file. +# +#---------------------------------------------------- +#Syntaxe +#vzgot.fistboot VE_name node domain ip_list [Base] +# VE_name is the container dir name +# Node is the container hostname +# Domain is the container domainname +# IP_LIST is an ip list (ip,ip1,ip2,..) used +# to prepare container network +# base_dir is this application root directory +# (used for devel only). +#---------------------------------------------------- +CONTNAME=$1 +NODE=$2 +DOMAIN=$3 +LSTIP=$4 +BASE=$5 +#---------------------------------------------------- +if ! [ -f $BASE/etc/vzgot/vzgot_config ] ; then + echo "Missing vzgot config file" + exit 1 #trouble trouble + fi +. $BASE/etc/vzgot/vzgot_config + +#specific container configuration override (if needed) +if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config ] ; then + $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config + fi +#---------------------------------------------------- +VZROOT=$BASE/$VZLIB/vzdir/$CONTNAME/rootfs +#==================================================== +#procedure to implement redhat distribution file +#---------------------------------------------------- +#Prepare /etc/hosts file +#---------------------------------------------------- + +HOSTS="$BASE/$VZLIB/vzdir/$CONTNAME/rootfs/etc/hosts" +( +echo "#----------------------------------------------------" +echo "#done by vzgot.fboot" +echo "#----------------------------------------------------" +echo -e "127.0.0.1\tlocalhost.localdomain\tlocalhost" +) > $HOSTS + +if [ -n $LSTIP ] ; then + ( + echo -n `echo $LSTIP | tr ',' ' ' | cut -d' ' -f1` + echo -e "\t$NODE.$DOMAIN\t\t$NODE" + echo "#----------------------------------------------------" + ) >> $HOSTS + fi + +#---------------------------------------------------- +#Prepare /etc/hostname +#---------------------------------------------------- +HST="$BASE/$VZLIB/vzdir/$CONTNAME/rootfs/etc/hostname" +( +echo "$NODE.$DOMAIN" +) > $HST + +#---------------------------------------------------- +#Prepare /etc/network/interface +#---------------------------------------------------- +#need directory to have /etc/init.d/networking to work +mkdir -p $BASE/$VZLIB/vzdir/$CONTNAME/rootfs/var/run/network + +#defining interface +INT="$BASE/$VZLIB/vzdir/$CONTNAME/rootfs/etc/network/interfaces" +( +echo "# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or" +echo "# /usr/share/doc/ifupdown/examples for more information." +echo +echo "auto lo" +echo "iface lo inet loopback" +) > $INT +if [ -n $LSTIP ] ; then + ETH0=`echo $LSTIP | tr ',' ' ' | cut -d' ' -f1` + ( + echo + echo "auto eth0" + echo "iface eth0 inet static" + echo "address $ETH0" + echo "netmask 255.255.255.255" + echo "up route add default dev eth0" + ) >> $INT + ETHX=`echo $LSTIP | tr ',' ' ' | cut -s -d' ' -f2-` + aliasnum=1 + for eth in $ETHX + do + ( + echo "auto eth0:$aliasnum" + echo "address $eth" + echo "netmask 255.255.255.255" + ) >> $INT + let aliasnum=aliasnum+1 + done + fi +#---------------------------------------------------- +#Prepare /dev directoy contents +#---------------------------------------------------- +DEV="$VZROOT/dev" + +rm -fr $DEV +mkdir -p $DEV +mknod -m 666 $DEV/null c 1 3 +mknod -m 666 $DEV/zero c 1 5 +mknod -m 666 $DEV/random c 1 8 +mknod -m 666 $DEV/urandom c 1 9 +mkdir -m 755 $DEV/pts +mkdir -m 1777 $DEV/shm +mknod -m 666 $DEV/tty c 5 0 +mknod -m 600 $DEV/console p +mknod -m 666 $DEV/tty0 c 4 0 +mknod -m 666 $DEV/full c 1 7 +mknod -m 600 $DEV/initctl p +mknod -m 666 $DEV/ptmx c 5 2 + +#---------------------------------------------------- +#Prepare /dev directoy fstab +#---------------------------------------------------- +FSTAB="$VZROOT/etc/fstab" +( +echo -e "/vzgot\t\t/\t\text3\tdefaults\t0 0" +echo -e "proc\t\t/proc\t\tproc\tdefaults\t0 0" +echo -e "sysfs\t\t/sys\t\tsysfs\tdefaults\t0 0" +echo -e "devpts\t\t/dev/pts\t\tdevpts\tdefaults\t0 0" +echo -e "tmpfs\t\t/dev/shm\t\ttmpfs\tdefaults\t0 0" +) > $FSTAB + +#==================================================== +#starting common container configuration process +( + +cd $BASE/$VZLIB +#---------------------------------------------------- +#insert a common root password within the vz + +if [ -f etc/shadow ] ; then + SHAD="$VZROOT/etc/shadow" + sed 's/#.*//g' etc/shadow | grep -v '^[[:space:]]*$' | \ + while read -r LINE + do + NAME=`echo $LINE | cut -d':' -f1` + (echo $LINE ; grep -v "^$NAME:" $SHAD) > $SHAD.new + mv -f $SHAD.new $SHAD + done + chmod 440 $SHAD + fi + +#setting the DNS resolver +if [ -f etc/resolv.conf ] ; then + cp -a etc/resolv.conf $VZROOT/etc + fi + +#duplicating ssh Key if we want to have all container even. +if [ -d etc/ssh ] ; then + #removing the hack to make original KEY + rm -fr $VZROOT/etc/rc2.d/S11sshhack + rm -fr $VZROOT/etc/init.d/ssh_key_hack.sh + for k in `ls etc/ssh/*key* 2> /dev/null` + do + cp -a $k $VZROOT/etc/ssh + done + fi + +#insert iptables script +if [ -f etc/sysconfig/iptables ] ; then + cp -a etc/sysconfig/iptables $VZROOT/etc/sysconfig + fi + +#adding sudoer informations +if [ -f etc/sudoers ] ; then + cat etc/sudoers >> $VZROOT/etc/sudoers + fi + +#adding snmpd.conf specific to ALL container +if [ -d $VZROOT/etc/snmp/ ] && [ -f etc/snmp/snmpd.conf ] ; then + cat etc/snmp/snmpd.conf>> $VZROOT/etc/snmp/snmpd.conf + fi + +) +#end common container configuration process +#==================================================== +#lets create common users and groups +ARCH=`cat $VZLIB/vzdir/$CONTNAME/arch` +CHROOT="/usr/bin/setarch $ARCH /usr/sbin/chroot" + +$CHROOT $VZROOT mount -t proc proc /proc +$CHROOT $VZROOT mount -t sysfs sysfs /sys + +#creating common group +if [ -f $VZLIB/etc/groups ] ; then + sed 's/#.*//g' $VZLIB/etc/groups | grep -v '^[[:space:]]*$' | \ + while read -r GRPNAME + do + $CHROOT $VZROOT groupadd $GRPNAME + done + fi + +#creating common users +if [ -f $VZLIB/etc/users ] ; then + sed 's/#.*//g' $VZLIB/etc/users | grep -v '^[[:space:]]*$' | \ + while read -r NAME CRYPTED GRPNAME + do + if [ -d $VZLIB/home/$NAME ] ; then + cp -a $VZLIB/home/$NAME $VZROOT/tmp + SKEL="-k /tmp/$NAME" + fi + $CHROOT $VZROOT useradd -m $SKEL -p "$CRYPTED" -g $GRPNAME $NAME + rm -fr $VZROOT/tmp/$NAME + done + fi + +#removing udev family auto start +$CHROOT $VZROOT update-rc.d -f udev remove > /dev/null 2>&1 +$CHROOT $VZROOT update-rc.d -f udev-finish remove > /dev/null 2>&1 + +$CHROOT $VZROOT umount /sys +$CHROOT $VZROOT umount /proc +#==================================================== +exit 0 diff --git a/shell/vzgot.fboot.redhat b/shell/vzgot.fboot.redhat new file mode 100755 index 0000000..769b124 --- /dev/null +++ b/shell/vzgot.fboot.redhat @@ -0,0 +1,216 @@ +#! /bin/sh +#---------------------------------------------------- +#shell used to prepare container structure, this script +#is called by the vzgot before any root pivot action. +#It is used on the firstboot to prepare all needed file. +# +#---------------------------------------------------- +#Syntaxe +#vzgot.fistboot VE_name node domain ip_list [Base] +# VE_name is the container dir name +# Node is the container hostname +# Domain is the container domainname +# IP_LIST is an ip list (ip,ip1,ip2,..) used +# to prepare container network +# base_dir is this application root directory +# (used for devel only). +#---------------------------------------------------- +CONTNAME=$1 +NODE=$2 +DOMAIN=$3 +LSTIP=$4 +BASE=$5 +#---------------------------------------------------- +if ! [ -f $BASE/etc/vzgot/vzgot_config ] ; then + echo "Missing vzgot config file" + exit 1 #trouble trouble + fi +. $BASE/etc/vzgot/vzgot_config + +#specific container configuration override (if needed) +if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config ] ; then + $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config + fi +#---------------------------------------------------- +VZROOT=$BASE/$VZLIB/vzdir/$CONTNAME/rootfs +#==================================================== +#procedure to implement redhat distribution file +#---------------------------------------------------- +#Prepare /etc/hosts file +#---------------------------------------------------- + +HOSTS="$BASE/$VZLIB/vzdir/$CONTNAME/rootfs/etc/hosts" +( +echo "#----------------------------------------------------" +echo "#done by vzgot.fboot" +echo "#----------------------------------------------------" +echo -e "127.0.0.1\tlocalhost.localdomain\tlocalhost" +) > $HOSTS + +if [ -n $LSTIP ] ; then + ( + echo -n `echo $LSTIP | tr ',' ' ' | cut -d' ' -f1` + echo -e "\t$NODE.$DOMAIN\t\t$NODE" + echo "#----------------------------------------------------" + ) >> $HOSTS + fi +#---------------------------------------------------- +#Prepare /etc/sysconfig/network file +#---------------------------------------------------- +NET="$BASE/$VZLIB/vzdir/$CONTNAME/rootfs/etc/sysconfig/network" +( +echo "NETWORK=yes" +echo "HOSTNAME=$NODE.$DOMAIN" +echo "GATEWAYDEV=$ETHNAME" +) > $NET + +#---------------------------------------------------- +#Prepare /etc/sysconfig/network-scripts/sysconfig-eth* file +#---------------------------------------------------- + +ETH="$BASE/$VZLIB/vzdir/$CONTNAME/rootfs/etc/sysconfig/network-scripts/ifcfg" +if [ -n $LSTIP ] ; then + ETH0=`echo $LSTIP | tr ',' ' ' | cut -d' ' -f1` + ( + echo "DEVICE=eth0" + echo "ONBOOT=yes" + echo "IPADDR=$ETH0" + echo "NETWORK=$ETH0" + echo "NETMASK=255.255.255.255" + ) > $ETH-eth0 + ETHX=`echo $LSTIP | tr ',' ' ' | cut -s -d' ' -f2-` + aliasnum=1 + for eth in $ETHX + do + ( + echo "DEVICE=eth0:$aliasnum" + echo "ONBOOT=yes" + echo "IPADDR=$eth" + echo "NETWORK=$ETH0" + echo "NETMASK=255.255.255.255" + ) > $ETH-eth0:$aliasnum + let aliasnum=aliasnum+1 + done + fi +#---------------------------------------------------- +#Prepare /dev directoy contents +#---------------------------------------------------- +DEV="$VZROOT/dev" + +rm -fr $DEV +mkdir -p $DEV +mknod -m 666 $DEV/null c 1 3 +mknod -m 666 $DEV/zero c 1 5 +mknod -m 666 $DEV/random c 1 8 +mknod -m 666 $DEV/urandom c 1 9 +mkdir -m 755 $DEV/pts +mkdir -m 1777 $DEV/shm +mknod -m 666 $DEV/tty c 5 0 +mknod -m 600 $DEV/console p +mknod -m 666 $DEV/tty0 c 4 0 +mknod -m 666 $DEV/full c 1 7 +mknod -m 600 $DEV/initctl p +mknod -m 666 $DEV/ptmx c 5 2 + +#---------------------------------------------------- +#Prepare /dev directoy fstab +#---------------------------------------------------- +FSTAB="$VZROOT/etc/fstab" +( +echo -e "/vzgot\t\t/\t\text3\tdefaults\t0 0" +echo -e "proc\t\t/proc\t\tproc\tdefaults\t0 0" +echo -e "sysfs\t\t/sys\t\tsysfs\tdefaults\t0 0" +echo -e "devpts\t\t/dev/pts\t\tdevpts\tdefaults\t0 0" +echo -e "tmpfs\t\t/dev/shm\t\ttmpfs\tdefaults\t0 0" +) > $FSTAB + +#==================================================== +#starting common container configuration process +( + +cd $BASE/$VZLIB +#---------------------------------------------------- +#insert a common root password within the vz + +if [ -f etc/shadow ] ; then + SHAD="$VZROOT/etc/shadow" + sed 's/#.*//g' etc/shadow | grep -v '^[[:space:]]*$' | \ + while read -r LINE + do + NAME=`echo $LINE | cut -d':' -f1` + (echo $LINE ; grep -v "^$NAME:" $SHAD) > $SHAD.new + mv -f $SHAD.new $SHAD + done + chmod 440 $SHAD + fi + +#setting the DNS resolver +if [ -f etc/resolv.conf ] ; then + cp -a etc/resolv.conf $VZROOT/etc + fi + +#duplicating ssh Key if we want to have all container even. +if [ -d etc/ssh ] ; then + for i in `ls etc/ssh/*key* 2> /dev/null` + do + cp -a $k $VZROOT/etc/ssh + done + fi + +#insert iptables script +if [ -f etc/sysconfig/iptables ] ; then + cp -a etc/sysconfig/iptables $VZROOT/etc/sysconfig + fi + +#adding sudoer informations +if [ -f etc/sudoers ] ; then + cat etc/sudoers >> $VZROOT/etc/sudoers + fi + +#adding snmpd.conf specific to ALL container +if [ -f etc/snmp/snmpd.conf ] ; then + cat etc/snmp/snmpd.conf>> $VZROOT/etc/snmp/snmpd.conf + fi + +) +#end common container configuration process +#==================================================== +#lets create common users and groups +ARCH=`cat $VZLIB/vzdir/$CONTNAME/arch` +CHROOT="/usr/bin/setarch $ARCH /usr/sbin/chroot" + +$CHROOT $VZROOT mount -t proc proc /proc +$CHROOT $VZROOT mount -t sysfs sysfs /sys + +#creating common group +if [ -f $VZLIB/etc/groups ] ; then + sed 's/#.*//g' $VZLIB/etc/groups | grep -v '^[[:space:]]*$' | \ + while read -r GRPNAME + do + $CHROOT $VZROOT groupadd $GRPNAME + done + fi + +#creating common users +if [ -f $VZLIB/etc/users ] ; then + sed 's/#.*//g' $VZLIB/etc/users | grep -v '^[[:space:]]*$' | \ + while read -r NAME CRYPTED GRPNAME + do + if [ -d $VZLIB/home/$NAME ] ; then + cp -a $VZLIB/home/$NAME $VZROOT/tmp + SKEL="-k /tmp/$NAME" + fi + $CHROOT $VZROOT useradd -m $SKEL -p "$CRYPTED" -g $GRPNAME $NAME + rm -fr $VZROOT/tmp/$NAME + done + fi + +#removing udev family auto start +UDEV="/sbin/start_udev" +$CHROOT $VZROOT /bin/mv $UDEV $UDEV.org > /dev/null 2>&1 +$CHROOT $VZROOT /bin/ln /bin/true $UDEV > /dev/null 2>&1 + +$CHROOT $VZROOT umount /sys +$CHROOT $VZROOT umount /proc +#==================================================== +exit 0 diff --git a/shell/vzgot.mksrvz b/shell/vzgot.mksrvz new file mode 100755 index 0000000..ae65112 --- /dev/null +++ b/shell/vzgot.mksrvz @@ -0,0 +1,129 @@ +#! /bin/bash +#vzgot.mksrvz +#------------------------------------------------------------------- +#procedure to install a specific VZserver +#$1 is the vserver node name (will become nodename.your_domain.name) +#------------------------------------------------------------------- +NODENAME=$1 +DOMAIN=`dnsdomainname` +VSR=$NODENAME.$DOMAIN +#=================================================================== +#setting default distribution and Architecture. +DISTRIB="fc12" +CPUARCH="i386" +#=================================================================== +#defining default template name +#you can modify it according your own template setup name rule +TPL=linux-$DISTRIB-$CPUARCH-vzserver.tar.gz +#=================================================================== +#lock procedure +lockproc() + +{ +LOCKFILE=/var/lock/`basename $0`.$1.lck + +trap "rm -f $LOCKFILE ; exit 1" 1 2 3 15 +if (set -C; : > $LOCKFILE) 2> /dev/null ; then + echo $$ >> $LOCKFILE + else + echo "Another '`basename $0` $1' is running, existing at once!" + echo "remove $LOCKFILE, if it is not the case" + rm -f $LOCKFILE + exit 0; + fi +} +#------------------------------------------------------------------- +#abort procedure +abort () + +{ +echo "$1" +rm -f $LOCKFILE +exit 1; +} + +#=================================================================== +#main process + +#locking building process +lockproc $1 +#=================================================================== +#getting all the needed information from the vzgot_list file +sed 's/#.*//g' /etc/vzgot/vzgot_list | \ + grep -v '^[[:space:]]*$' | \ + grep $NODENAME | \ +while read -r NODE TEMPLATE DISTRIB CPUARCH + do + +#setting distribution + FLINUX="RedHat" + case "$DISTRIB" in + "ovzel5.4" | \ + "el5.2" | \ + "el5.3" | \ + "el5.4" | \ + "el4.8" | \ + "el4.7" | \ + "el4.6" | \ + "ovzfc12" | \ + "fc12" | \ + "fc11" | \ + "fc10" | \ + "fc9" | \ + "fc8" | \ + "fc7" | \ + "fc6" | \ + "fc5" | \ + "fc4" | \ + "fc3" | \ + "fc2" | \ + "rhel4" | \ + "rh9" | \ + "rh8.0" | \ + "rh7.3" ) + FLINUX="RedHat" #Redhat family distribution + ;; + "ovzubu9.4" | \ + "ubu9.4" | \ + "ubu8.4" ) + FLINUX="Debian" #Debian family distribution + ;; + "*" ) + abort "Unknown Linux distribution, exiting" + exit 1 + ;; + esac; +#=================================================================== +#extracting node ip number + IPNUM=`dig +short $VSR | grep -v [a-z]` + if [ -z "$IPNUM" ] ; then + abort "No IP number found for $VSR hostname" + fi +#------------------------------------------------------------------- +#lets create the node file system + TPL=$TEMPLATE.tar.gz + vzgot create $NODENAME $TPL $DISTRIB $CPUARCH + RETVAL=$? + if [ $RETVAL -ne 0 ] ; then + abort "Unable to create $NODENAME root file system" + fi +#------------------------------------------------------------------- +#lets do the node first boot + vzgot firstboot -D $FLINUX -i $IPNUM -d $DOMAIN -n $NODENAME $NODENAME + RETVAL=$? + if [ $RETVAL -ne 0 ] ; then + abort "Unable to do $NODENAME first boot" + fi +#------------------------------------------------------------------- +#lets start vzgot + vzgot boot $NODENAME + RETVAL=$? + if [ $RETVAL -ne 0 ] ; then + abort "Unable to boot $NODENAME" + fi + #everything fine + echo "$NODENAME is now installed and 'up and running'" +#=================================================================== + done +#END +rm -f $LOCKFILE diff --git a/shell/vzgot.net b/shell/vzgot.net new file mode 100755 index 0000000..1895822 --- /dev/null +++ b/shell/vzgot.net @@ -0,0 +1,86 @@ +#! /bin/sh +#---------------------------------------------------- +#shell used to assign/remove route needed by +#a container when container is started or stopped +# +#---------------------------------------------------- +#Syntaxe +#vzgot.net VE_name assign|remove [base_dir] +# VE_name is the container dir name +# "assign" to set container needed route +# "remove" to reset container needed route +# base_dir is this application root directory +# used for devel only. +#---------------------------------------------------- +CONTNAME=$1 +ACTION=$2 +BASE=$3 +#---------------------------------------------------- +if ! [ -f $BASE/etc/vzgot/vzgot_config ] ; then + echo "Missing vzgot config file" + exit 1 #trouble trouble + fi +. $BASE/etc/vzgot/vzgot_config + +#specific container configuration override (if needed) +if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config ] ; then + $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config + fi +#---------------------------------------------------- +FLINUX="RedHat" +if [ -f $VZLIB/vzdir/$CONTNAME/linux ] ; then + FLINUX=`cat $VZLIB/vzdir/$CONTNAME/linux` + fi + +#lets prepare all routing according type of linux +#RedHat beeing the default +case "$FLINUX" in + "*" | \ + "RedHat" ) + NETINFO="$BASE/$VZLIB/vzdir/$CONTNAME/rootfs/etc/sysconfig/network-scripts" + for f in $NETINFO/ifcfg-* + do + EXT=`basename $f | cut -d'-' -f2` + case "$EXT" in + "lo" ) #local interface, nothing to do + ;; + * ) + ADDR=`grep IPADDR $f | cut -d'=' -f2` + case "$ACTION" in + "assign" ) + #pre-emptive route assignation + /sbin/route add $ADDR dev $BRIDGENAME + ;; + "remove" ) + /sbin/route del $ADDR dev $BRIDGENAME + ;; + * ) + echo "ACTION request '$ACTION' is unexpected!" + ;; + esac + ;; + esac + done + ;; + + "Debian" ) + NETINFO="$BASE/$VZLIB/vzdir/$CONTNAME/rootfs/etc/network" + for ADDR in `grep address $NETINFO/interfaces | cut -d' ' -f2` + do + case "$ACTION" in + "assign" ) + #pre-emptive route assignation + /sbin/route add $ADDR dev $BRIDGENAME + ;; + "remove" ) + /sbin/route del $ADDR dev $BRIDGENAME + ;; + * ) + echo "ACTION request '$ACTION' is unexpected!" + ;; + esac + done + ;; + esac +#---------------------------------------------------- +exit 0 diff --git a/shell/vzgot.open b/shell/vzgot.open new file mode 100755 index 0000000..0f422ff --- /dev/null +++ b/shell/vzgot.open @@ -0,0 +1,87 @@ +#! /bin/sh +#---------------------------------------------------- +#shell used to setup the host part (network, cgroup) +#while starting a vzgot Virtual Host +#This shell is called from the vzgot executable +# vzgot boot cont_name +# +#---------------------------------------------------- +#Syntaxe +#vzgot.open VE_name VE_pid [base_dir] +# VE_name is the container dir name +# HS_pid is the vzgot container master process +# VE_pid is the container main process ID as seen +# by the host +# base_dir is this application root directory +# used for devel only. +#---------------------------------------------------- +CONTNAME=$1 +HSPID=$2 +VEPID=$3 +BASE=$4 +#---------------------------------------------------- +if ! [ -f $BASE/etc/vzgot/vzgot_config ] ; then + echo "Missing vzgot config file" + exit 1 #trouble trouble + fi +. $BASE/etc/vzgot/vzgot_config + +#specific container configuration override (if needed) +if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config ] ; then + $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config + fi +#---------------------------------------------------- +#Using cgroup if available and operational +if [ -f $CGROUP/tasks ] ; then + ln -nsf $CGROUP/$VEPID $BASE/$VZLIB/vzdir/$CONTNAME/cgroup + if [ -d $BASE/$VZLIB/vzdir/$CONTNAME/cgroup.d ] ; then + for c in `ls $BASE/$VZLIB/vzdir/$CONTNAME/cgroup.d` + do #setting container limits + sed 's/#.*//g' $BASE/$VZLIB/vzdir/$CONTNAME/cgroup.d/$c | \ + grep -v '^[[:space:]]*$' > /tmp/$c.$$ + exec 5< /tmp/$c.$$ + while read -r -u 5 COMMAND + do + echo $COMMAND > $BASE/$VZLIB/vzdir/$CONTNAME/cgroup/$c + done + exec 5<&- + rm -fr /tmp/$c.$$ + + done + fi + fi +#---------------------------------------------------- +#to be sure to start fresh with veth pair +ip link del To_$HSPID > /dev/null 2>&1 +#creation the veth pair. +ip link add name To_$HSPID type veth peer name From_$HSPID +ret=$? +if [ $ret -ne 0 ]; then + echo "vzgot.init, unable to create veth To_$HSPID/From_$HSPID pair" + exit $ret + fi +#activating vteh HOST interface +ifconfig To_$HSPID up +ret=$? +if [ $ret -ne 0 ]; then + echo "vzgot.init, unable to activate veth HOST part" + exit $ret + fi +#linking HOST vteh to bridge +brctl addif $BRIDGENAME To_$HSPID +ret=$? +if [ $ret -ne 0 ]; then + echo "vzgot.init, unable to link veth HOST part to bridge" + exit $ret + fi +#giving the "from" part of the pair to VZ +ip link set From_$HSPID netns $VEPID +if [ $ret -ne 0 ]; then + echo "vzgot.init, unable to give From_$HSPID veth pair to VZ process" + exit $ret + fi +#---------------------------------------------------- +#lets prepare all routing +$BASE/$VZLIB/shell/vzgot.net $CONTNAME assign $BASE +#---------------------------------------------------- +exit 0 diff --git a/shell/vzgot.redoall b/shell/vzgot.redoall new file mode 100755 index 0000000..19ec091 --- /dev/null +++ b/shell/vzgot.redoall @@ -0,0 +1,82 @@ +#! /bin/bash +#vzgot.redoall +#------------------------------------------------------------------- +#procedure to re-install a set of predefined container. +#its purpose is to generate 'clean' container over and over +#$1 is the file with the container list +#$2 base_dir is this application root directory +# used for devel only. +#container list format is +# container_name distrinution architecture +#------------------------------------------------------------------- +LIST=$1 +BASE=$2 +#=================================================================== +#lock procedure +lockproc() + +{ +LOCKFILE=/var/lock/`basename $0`.$1.lck + +trap "rm -f $LOCKFILE ; exit 1" 1 2 3 15 +if (set -C; : > $LOCKFILE) 2> /dev/null ; then + echo $$ >> $LOCKFILE + else + echo "Another '`basename $0` $1' is running, existing at once!" + echo "remove $LOCKFILE, if it is not the case" + rm -f $LOCKFILE + exit 0; + fi +} +#------------------------------------------------------------------- +#abort procedure +abort () + +{ +echo "$1" +rm -f $LOCKFILE +exit 1; +} + +#=================================================================== +#main process +#=================================================================== + +#locking building process +lockproc $1 + +if ! [ -f $BASE/etc/vzgot/vzgot_config ] ; then + echo "Missing vzgot config file" + exit 1 #trouble trouble + fi +. $BASE/etc/vzgot/vzgot_config + +#specific container configuration override (if needed) +if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config ] ; then + $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config + fi + +#------------------------------------------------------------------- +#is the list file file existing +if [ -f $BASE/etc/vzgot/$LIST ] ; then + cat $BASE/etc/vzgot/$LIST | sed 's/#.*//g' | grep -v '^[[:space:]]*$' > /tmp/redo.$$ + exec 5< /tmp/redo.$$ + while read -r -u 5 CONTNAME REMAINING + do + if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/first.pid ] ; then + vzgot shutdown $CONTNAME + while [ -f $BASE/$VZLIB/vzdir/$CONTNAME/first.pid ] + do + sleep 1 + done + fi + if [ -d $BASE/$VZLIB/vzdir/$CONTNAME ] ; then + vzgot destroy $CONTNAME + fi + vzgot.mksrvz $CONTNAME + done + exec 5<&- + rm -fr /tmp/redo.$$ + fi + +rm -f $LOCKFILE diff --git a/shell/vzgot.start b/shell/vzgot.start new file mode 100755 index 0000000..241e30b --- /dev/null +++ b/shell/vzgot.start @@ -0,0 +1,43 @@ +#! /bin/sh +#---------------------------------------------------- +#shell used to initiate container, this script +#is called by the container BEFORE all the +#pivot root action. +# +#---------------------------------------------------- +#Syntaxe +#vzgot.start VE_name VE_pid [base_dir] +# VE_name is the container dir name +# VE_pid is the container main process ID as seen +# by the host +# base_dir is this application root directory +# used for devel only. +#---------------------------------------------------- +CONTNAME=$1 +VEPID=$2 +BASE=$3 +#---------------------------------------------------- +if ! [ -f $BASE/etc/vzgot/vzgot_config ] ; then + echo "Missing vzgot config file" + exit 1 #trouble trouble + fi +. $BASE/etc/vzgot/vzgot_config + +#specific container configuration override (if needed) +if [ -f $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config ] ; then + $BASE/$VZLIB/vzdir/$CONTNAME/vzgot_config + fi +#---------------------------------------------------- +#renaming VETH pair to a standard ETH name +ip link set From_$2 name $ETHNAME +ret=$? +if [ $ret -ne 0 ]; then + echo "vzgot.container.start, unable to rename veth From_$2 to $ETHNAME" + exit $ret + fi +#---------------------------------------------------- +#setting the fastboot flag +rm -fr $BASE/$VZLIB/vzdir/$CONTNAME/rootfs/.autofsck +touch $BASE/$VZLIB/vzdir/$CONTNAME/rootfs/fastboot +#---------------------------------------------------- +exit 0 diff --git a/support/Changes b/support/Changes new file mode 100644 index 0000000..fd975c1 --- /dev/null +++ b/support/Changes @@ -0,0 +1,2290 @@ +#Log des mises a jour RCS +#--------------------------------------------------------------------------------- +#Ce fichier est pour tracer les changements fait dans le developpement +#de MentorX +$Log: Changes,v $ +Revision 0.84.0.0 2010/03/06 16:39:08 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:39:08 jmp +upgrade version + +Revision 0.83.0.1 2010/03/06 16:39:08 jmp +Mise en place su GIT + +Revision 0.83.0.0 2010/03/06 16:39:08 jmp +Ratrapage numero de Version + +Revision 0.83 2010/03/06 16:39:08 jmp +Creation +#================================================================================= + +Revision 0.84.0.0 2010/03/06 16:38:31 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:38:31 jmp +upgrade version + +Revision 0.83.0.1 2010/03/06 16:38:31 jmp +Mise en place su GIT + +Revision 0.83.0.0 2010/03/06 16:38:31 jmp +Ratrapage numero de Version + +Revision 0.83 2010/03/06 16:38:31 jmp +Creation +#================================================================================= + +Revision 0.84.0.0 2010/03/06 16:36:51 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:36:51 jmp +upgrade version + +Revision 0.83.0.2 2010/03/06 16:36:51 jmp +Mise en place su GIT + +Revision 0.83.0.1 2010/03/06 16:36:51 jmp +Ratrapage numero de Version + +Revision 0.83 2010/03/06 16:36:51 jmp +Creation +#================================================================================= + +Revision 0.84.0.1 2010/03/06 16:36:32 jmp +Mise en place su GIT + +Revision 0.84.0.0 2010/03/06 16:36:32 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:36:32 jmp +Creation +#================================================================================= + +Revision 0.84.0.0 2010/03/06 16:36:03 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:36:03 jmp +upgrade version + +Revision 0.83.0.8 2010/03/06 16:36:03 jmp +Mise en place su GIT + +Revision 0.83.0.7 2010/03/06 16:36:03 jmp +Ratrapage numero de Version + +Revision 0.83 2010/03/06 16:36:03 jmp +Creation +#================================================================================= + +Revision 0.83.0.7 2010/02/18 14:28:22 safe +Suppression de la definition de CLONE_SYSLOG + +#================================================================================= + +Revision 0.83.0.6 2010/02/15 21:03:45 safe +itest de fonctionnement de syslog sans CLONE_SYSLOG + +#================================================================================= + +Revision 0.83.0.5 2010/02/15 21:02:28 safe +itest de fonctionnement de syslog sans CLONE_SYSLOG + +#================================================================================= + +Revision 0.83.0.4 2010/02/15 17:13:54 safe +creation d'un clone avec CLONE_SYSLOG + +#================================================================================= + +Revision 0.83.0.3 2010/02/10 02:50:09 safe +creation d'un clone avec CLONE_NEWUSER + +#================================================================================= + +Revision 0.83.0.2 2010/02/01 18:44:35 safe +Modification de la copie des clefs dans fboot.{redhat,debian} +prise II + +#================================================================================= + +Revision 0.83.0.1 2010/02/01 18:32:54 safe +Modification de la copie des clefs dans fboot.{redhat,debian} + +#================================================================================= + +Revision 0.83.0.0 2010/01/12 15:36:45 safe +Ratrapage numero de Version + +Revision 0.83 2010/01/12 15:36:45 safe +upgrade version + +Revision 0.82.0.27 2010/01/12 15:36:45 safe +release + +#================================================================================= + +Revision 0.82.0.26 2010/01/12 15:25:05 safe +Correction dans champ i386 manquant dans vxgot_list (rhel4) + +#================================================================================= + +Revision 0.82.0.25 2010/01/12 13:54:15 safe +Correction dans champ i386 manquant dans vxgot_list + +#================================================================================= + +Revision 0.82.0.24 2010/01/12 05:24:32 safe +Correction dans vzgot.mksrvz, variable CPUARCH + +#================================================================================= + +Revision 0.82.0.23 2010/01/12 05:03:13 safe +ajustement useradd dans fboot.redhat prise IV + +#================================================================================= + +Revision 0.82.0.22 2010/01/12 05:00:21 safe +ajustement useradd dans fboot.redhat prise III + +#================================================================================= + +Revision 0.82.0.21 2010/01/12 04:57:53 safe +ajustement useradd dans fboot.redhat prise II + +#================================================================================= + +Revision 0.82.0.20 2010/01/12 04:53:56 safe +ajustement useradd dans fboot.redhat + +#================================================================================= + +Revision 0.82.0.19 2010/01/12 04:42:44 safe +modification fichier groups + +#================================================================================= + +Revision 0.82.0.18 2010/01/12 04:22:46 safe +extension du fichier vzgost_list +modification du script vzgot.redoall + +#================================================================================= + +Revision 0.82.0.17 2010/01/12 04:03:38 safe +inclusion du repertoire /var/lib/vzgot/etc/ssh + +#================================================================================= + +Revision 0.82.0.16 2010/01/11 21:06:32 safe +Test d'installation a partir de zero +gestion de udev pour les versions de type redhat prise III + +#================================================================================= + +Revision 0.82.0.15 2010/01/11 21:04:25 safe +Test d'installation a partir de zero +gestion de udev pour les versions de type redhat prise II + +#================================================================================= + +Revision 0.82.0.14 2010/01/11 21:01:58 safe +Test d'installation a partir de zero +gestion de udev pour les versions de type redhat + +#================================================================================= + +Revision 0.82.0.13 2010/01/11 20:49:55 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise IX + +#================================================================================= + +Revision 0.82.0.12 2010/01/11 20:47:00 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise VIII + +#================================================================================= + +Revision 0.82.0.11 2010/01/11 20:42:46 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise VII + +#================================================================================= + +Revision 0.82.0.10 2010/01/11 20:39:50 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise VI + +#================================================================================= + +Revision 0.82.0.9 2010/01/11 20:28:49 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise V + +#================================================================================= + +Revision 0.82.0.8 2010/01/11 20:26:32 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise IV + +#================================================================================= + +Revision 0.82.0.7 2010/01/11 20:19:25 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prose III + +#================================================================================= + +Revision 0.82.0.6 2010/01/11 20:15:35 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prose II + +#================================================================================= + +Revision 0.82.0.5 2010/01/11 20:13:47 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) + +#================================================================================= + +Revision 0.82.0.4 2010/01/11 20:08:15 safe +Test d'installation a partir de zero +ajustement shell script vzgot.mksrvz + +#================================================================================= + +Revision 0.82.0.3 2010/01/11 20:04:49 safe +Test d'installation a partir de zero +configuration de etc/shadow et etc/resolv.conf +a partir des informations du host. + +#================================================================================= + +Revision 0.82.0.2 2010/01/11 16:49:38 safe +Test d'installation a partir de zero +changement de vzgot.mxsrvz + +#================================================================================= + +Revision 0.82.0.1 2010/01/11 16:05:57 safe +Test d'installation a partir de zero +introduction de vzgot_list + +#================================================================================= + +Revision 0.82.0.0 2010/01/10 03:28:28 safe +Ratrapage numero de Version + +Revision 0.82 2010/01/10 03:28:28 safe +upgrade version + +Revision 0.81.0.12 2010/01/10 03:28:28 safe +Test d'installation a partir de zero + +#================================================================================= + +Revision 0.81.0.11 2010/01/09 15:38:30 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise XXI + +#================================================================================= + +Revision 0.81.0.10 2010/01/09 15:34:44 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise XX + +#================================================================================= + +Revision 0.81.0.9 2010/01/09 15:31:42 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise XIX + +#================================================================================= + +Revision 0.81.0.8 2010/01/09 14:57:24 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise VIII + +#================================================================================= + +Revision 0.81.0.7 2010/01/09 14:49:02 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise VII + +#================================================================================= + +Revision 0.81.0.6 2010/01/09 03:47:32 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise VI + +#================================================================================= + +Revision 0.81.0.5 2010/01/09 03:46:11 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise V + +#================================================================================= + +Revision 0.81.0.4 2010/01/09 03:41:05 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise IV + +#================================================================================= + +Revision 0.81.0.3 2010/01/09 03:30:32 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise III + +#================================================================================= + +Revision 0.81.0.2 2010/01/09 03:25:29 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise II + +#================================================================================= + +Revision 0.81.0.1 2010/01/09 03:20:34 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.81.0.0 2010/01/09 03:20:15 safe +Ratrapage numero de Version + +Revision 0.81 2010/01/09 03:20:15 safe +upgrade version + +Revision 0.79.0.1 2010/01/09 03:20:15 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.79.0.0 2010/01/09 03:16:25 safe +Ratrapage numero de Version + +Revision 0.79 2010/01/09 03:16:25 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.78 2010/01/09 03:16:06 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.77.0.1 2010/01/09 03:15:48 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.77.0.0 2010/01/08 18:37:09 safe +Ratrapage numero de Version + +Revision 0.77 2010/01/08 18:37:09 safe +upgrade version + +Revision 0.75.0.16 2010/01/08 18:37:09 safe +utilisation des partitions LVM + +#================================================================================= + +Revision 0.75.0.15 2010/01/08 04:44:44 safe +Probleme avec Debian ubu8.4, Prise V +problem useradd + +#================================================================================= + +Revision 0.75.0.14 2010/01/08 03:44:53 safe +Probleme avec Debian ubu8.4, Prise IV +changement de la routine de useradd pour ne pas cree +le home directory directement + +#================================================================================= + +Revision 0.75.0.13 2010/01/08 03:39:10 safe +Probleme avec Debian ubu8.4, Prise III +changement de la routine de useradd pour ne pas cree +le home directory directement + +#================================================================================= + +Revision 0.75.0.12 2010/01/08 03:35:54 safe +Probleme avec Debian ubu8.4, Prise II +changement de la routine de useradd pour ne pas cree +le home directory directement + +#================================================================================= + +Revision 0.75.0.11 2010/01/08 03:26:36 safe +Probleme avec Debian ubu8.4, +changement de la routine de useradd pour ne pas cree +le home directory directement + +#================================================================================= + +Revision 0.75.0.10 2010/01/07 20:31:44 safe +insertion de ubu9.4 comme apartenant a Debian +creation du repertoir /var/run/networking +modification devices.allow pour permerttre les devices PTS Prise II + +#================================================================================= + +Revision 0.75.0.9 2010/01/07 20:25:30 safe +insertion de ubu9.4 comme apartenant a Debian +creation du repertoir /var/run/networking +modification devices.allow pour permerttre les devices PTS + +#================================================================================= + +Revision 0.75.0.8 2010/01/07 20:05:55 safe +insertion de ubu9.4 comme apartenant a Debian + +#================================================================================= + +Revision 0.75.0.7 2010/01/07 18:56:34 safe +cgroup operationel, mise en place de iptables + +#================================================================================= + +Revision 0.75.0.6 2010/01/07 05:15:18 safe +Creation du repertoir cgroup.d et gestion Prise IV + +#================================================================================= + +Revision 0.75.0.5 2010/01/07 04:58:32 safe +Creation du repertoir cgroup.d et gestion Prise III + +#================================================================================= + +Revision 0.75.0.4 2010/01/06 21:05:28 safe +Creation du repertoir cgroup.d et gestion Prise II + +#================================================================================= + +Revision 0.75.0.3 2010/01/06 20:43:25 safe +Creation du repertoir cgroup.d et gestion + +#================================================================================= + +Revision 0.75.0.2 2010/01/06 03:11:33 safe +Creation du repertoire vztemplate + +#================================================================================= + +Revision 0.75.0.1 2010/01/06 02:52:01 safe +Mise en place de cgroup Prise II + +#================================================================================= + +Revision 0.75.0.0 2010/01/06 02:38:45 safe +Ratrapage numero de Version + +Revision 0.75 2010/01/06 02:38:45 safe +upgrade version + +Revision 0.71.0.19 2010/01/06 02:38:45 safe +Mise en place de cgroup + +#================================================================================= + +Revision 0.71.0.18 2010/01/05 05:25:39 safe +Container de type ubuntu Prise XXI (ajustement shell debian) + +#================================================================================= + +Revision 0.71.0.17 2010/01/05 05:19:55 safe +Container de type ubuntu Prise XX (ajustement shell debian) + +#================================================================================= + +Revision 0.71.0.16 2010/01/05 05:02:49 safe +Container de type ubuntu Prise XIX (ajustement shell debian) + +#================================================================================= + +Revision 0.71.0.15 2010/01/05 04:32:35 safe +Container de type ubuntu Prise VIII (ajustement shell debian) + +#================================================================================= + +Revision 0.71.0.14 2010/01/05 04:27:22 safe +Container de type ubuntu Prise VII (removing udev auto start) + +Mise en route Debian (Ubuntu) +- Template lxc-ubuntu-8.04-i386.tar.gz (stephane graber lxc) + le rootfs est mal positionner +- le fichier network est dans /etc/network/interface (a construire) +- removing udev family auto start + +#================================================================================= + +Revision 0.71.0.13 2010/01/05 01:18:58 safe +Container de type ubuntu Prise VI (correction setting reseau) + +#================================================================================= + +Revision 0.71.0.12 2010/01/04 23:27:58 safe +Container de type ubuntu Prise V (correction setting reseau) + +#================================================================================= + +Revision 0.71.0.11 2010/01/04 23:24:54 safe +Container de type ubuntu Prise IV (correction setting reseau) + +#================================================================================= + +Revision 0.71.0.10 2010/01/04 20:24:28 safe +Container de type ubuntu Prise III (corrction setting reseau) + +#================================================================================= + +Revision 0.71.0.9 2010/01/04 20:10:34 safe +Container de type unbutu Prise II (c'est un debian!) + +#================================================================================= + +Revision 0.71.0.8 2010/01/04 19:46:55 safe +Container de type unbutu Prise I + +#================================================================================= + +Revision 0.71.0.7 2010/01/04 18:53:15 safe +Ajustement spec file chkconfig + +#================================================================================= + +Revision 0.71.0.6 2010/01/04 16:11:34 safe +Inclusion de Change et affichage des resultats +de pipe en mode no debug + +#================================================================================= + +Revision 0.71.0.5 2010/01/04 16:07:38 safe +Inclusion de Change et affichage des resultats +de pipe en mode no debug + +#================================================================================= + +Revision 0.71.0.4 2010/01/04 15:45:34 safe +Inclusion de Change et affichage des resultats +de pipe en mode no debug + +#================================================================================= + +Revision 0.71.0.3 2010/01/04 02:13:12 safe +README Operationnel + +#================================================================================= + +Revision 0.71.0.2 2010/01/04 01:23:05 safe +ajout du README Prise II + +#================================================================================= + +Revision 0.71.0.1 2010/01/04 01:18:11 safe +ajout du README + +#================================================================================= + +Revision 0.71.0.0 2010/01/03 23:29:18 safe +Ratrapage numero de Version + +Revision 0.71 2010/01/03 23:29:18 safe +upgrade version + +Revision 0.70.0.85 2010/01/03 23:29:18 safe +service vzgot start est operationnel + +#================================================================================= + +Revision 0.70.0.84 2010/01/03 22:24:19 safe +mise en place d'une console prise XXVII + +#================================================================================= + +Revision 0.70.0.83 2010/01/03 22:13:15 safe +mise en place d'une console prise XXVI + +#================================================================================= + +Revision 0.70.0.82 2010/01/03 22:07:54 safe +mise en place d'une console prise XXV + +#================================================================================= + +Revision 0.70.0.81 2010/01/03 22:04:37 safe +mise en place d'une console prise XXIV + +#================================================================================= + +Revision 0.70.0.80 2010/01/03 21:58:41 safe +mise en place d'une console prise XXIII + +#================================================================================= + +Revision 0.70.0.79 2010/01/03 21:46:32 safe +mise en place d'une console prise XXII + +#================================================================================= + +Revision 0.70.0.78 2010/01/03 21:41:28 safe +mise en place d'une console prise XXI + +#================================================================================= + +Revision 0.70.0.77 2010/01/03 21:26:54 safe +mise en place d'une console prise XX + +#================================================================================= + +Revision 0.70.0.76 2010/01/03 21:24:07 safe +mise en place d'une console prise XIX + +#================================================================================= + +Revision 0.70.0.75 2010/01/03 21:22:55 safe +mise en place d'une console prise XVIII + +#================================================================================= + +Revision 0.70.0.74 2010/01/03 21:20:18 safe +mise en place d'une console prise XVII + +#================================================================================= + +Revision 0.70.0.73 2010/01/03 21:16:08 safe +mise en place d'une console prise XVI + +#================================================================================= + +Revision 0.70.0.72 2010/01/03 21:14:20 safe +mise en place d'une console prise XV + +#================================================================================= + +Revision 0.70.0.71 2010/01/03 21:11:26 safe +mise en place d'une console prise XIV + +#================================================================================= + +Revision 0.70.0.70 2010/01/03 19:48:04 safe +mise en place d'une console prise XIII + +#================================================================================= + +Revision 0.70.0.69 2010/01/03 19:45:36 safe +mise en place d'une console prise XII + +#================================================================================= + +Revision 0.70.0.68 2010/01/03 19:30:24 safe +mise en place d'une console prise XI + +#================================================================================= + +Revision 0.70.0.67 2010/01/03 19:27:53 safe +mise en place d'une console prise X + +#================================================================================= + +Revision 0.70.0.66 2010/01/03 18:18:31 safe +mise en place d'une console prise IX + +#================================================================================= + +Revision 0.70.0.65 2010/01/03 18:10:15 safe +mise en place d'une console prise VIII + +#================================================================================= + +Revision 0.70.0.64 2010/01/03 18:07:47 safe +mise en place d'une console prise VII + +#================================================================================= + +Revision 0.70.0.63 2010/01/03 18:06:06 safe +mise en place d'une console prise VI + +#================================================================================= + +Revision 0.70.0.62 2010/01/03 18:04:44 safe +mise en place d'une console prise V + +#================================================================================= + +Revision 0.70.0.61 2010/01/03 18:01:26 safe +mise en place d'une console prise IV + +#================================================================================= + +Revision 0.70.0.60 2010/01/03 17:59:22 safe +mise en place d'une console prise III + +#================================================================================= + +Revision 0.70.0.59 2010/01/03 17:57:44 safe +mise en place d'une console prise II + +#================================================================================= + +Revision 0.70.0.58 2010/01/03 17:53:48 safe +mise en place d'une console prise I + +#================================================================================= + +Revision 0.70.0.57 2010/01/03 06:29:35 safe +traitement problem de message au demarrage boot systeme Prise IX + +#================================================================================= + +Revision 0.70.0.56 2010/01/03 06:27:02 safe +traitement problem de message au demarrage boot systeme Prise VIII + +#================================================================================= + +Revision 0.70.0.55 2010/01/03 06:22:27 safe +traitement problem de message au demarrage boot systeme Prise VII + +#================================================================================= + +Revision 0.70.0.54 2010/01/03 06:20:50 safe +traitement problem de message au demarrage boot systeme Prise VI + +#================================================================================= + +Revision 0.70.0.53 2010/01/03 06:17:25 safe +traitement problem de message au demarrage boot systeme Prise V + +#================================================================================= + +Revision 0.70.0.52 2010/01/03 06:13:23 safe +traitement problem de message au demarrage boot systeme Prise IV + +#================================================================================= + +Revision 0.70.0.51 2010/01/03 06:11:29 safe +traitement problem de message au demarrage boot systeme Prise III + +#================================================================================= + +Revision 0.70.0.50 2010/01/03 06:06:49 safe +traitement problem de message au demarrage boot systeme Prise II + +#================================================================================= + +Revision 0.70.0.49 2010/01/03 05:53:08 safe +traitement problem de message au demarrage boot systeme Prise I + +#================================================================================= + +Revision 0.70.0.48 2010/01/03 04:50:29 safe +traitement problem de message au demarrage boot systeme + +#================================================================================= + +Revision 0.70.0.47 2010/01/03 01:30:05 safe +creation du fichier /etc/init.d/vzgot prise XXVI + +#================================================================================= + +Revision 0.70.0.46 2010/01/03 01:28:52 safe +creation du fichier /etc/init.d/vzgot prise XXV + +#================================================================================= + +Revision 0.70.0.45 2010/01/03 01:25:37 safe +creation du fichier /etc/init.d/vzgot prise XXIV + +#================================================================================= + +Revision 0.70.0.44 2010/01/03 01:23:25 safe +creation du fichier /etc/init.d/vzgot prise XXIII + +#================================================================================= + +Revision 0.70.0.43 2010/01/03 01:17:40 safe +creation du fichier /etc/init.d/vzgot prise XXII + +#================================================================================= + +Revision 0.70.0.42 2010/01/02 21:18:57 safe +creation du fichier /etc/init.d/vzgot prise XXI + +#================================================================================= + +Revision 0.70.0.41 2010/01/02 21:16:38 safe +creation du fichier /etc/init.d/vzgot prise XX + +#================================================================================= + +Revision 0.70.0.40 2010/01/02 20:57:02 safe +creation du fichier /etc/init.d/vzgot prise XIX + +#================================================================================= + +Revision 0.70.0.39 2010/01/02 20:28:55 safe +creation du fichier /etc/init.d/vzgot prise XVIII + +#================================================================================= + +Revision 0.70.0.38 2010/01/02 20:28:18 safe +creation du fichier /etc/init.d/vzgot prise XVII + +#================================================================================= + +Revision 0.70.0.37 2010/01/02 20:26:56 safe +creation du fichier /etc/init.d/vzgot prise XVI + +#================================================================================= + +Revision 0.70.0.36 2010/01/02 20:23:55 safe +creation du fichier /etc/init.d/vzgot prise XV + +#================================================================================= + +Revision 0.70.0.35 2010/01/02 20:21:19 safe +creation du fichier /etc/init.d/vzgot prise XIV + +#================================================================================= + +Revision 0.70.0.34 2010/01/02 20:20:09 safe +creation du fichier /etc/init.d/vzgot prise XIII + +#================================================================================= + +Revision 0.70.0.33 2010/01/02 20:16:04 safe +creation du fichier /etc/init.d/vzgot prise XII + +#================================================================================= + +Revision 0.70.0.32 2010/01/02 20:11:37 safe +creation du fichier /etc/init.d/vzgot prise XI + +#================================================================================= + +Revision 0.70.0.31 2010/01/02 20:10:25 safe +creation du fichier /etc/init.d/vzgot prise X + +#================================================================================= + +Revision 0.70.0.30 2010/01/02 20:09:17 safe +creation du fichier /etc/init.d/vzgot prise IX + +#================================================================================= + +Revision 0.70.0.29 2010/01/02 20:03:58 safe +creation du fichier /etc/init.d/vzgot prise VIII + +#================================================================================= + +Revision 0.70.0.28 2010/01/02 20:00:40 safe +creation du fichier /etc/init.d/vzgot prise VII + +#================================================================================= + +Revision 0.70.0.27 2010/01/02 19:59:14 safe +creation du fichier /etc/init.d/vzgot prise VI + +#================================================================================= + +Revision 0.70.0.26 2010/01/02 19:58:16 safe +creation du fichier /etc/init.d/vzgot prise V + +#================================================================================= + +Revision 0.70.0.25 2010/01/02 19:49:31 safe +creation du fichier /etc/init.d/vzgot prise IV + +#================================================================================= + +Revision 0.70.0.24 2010/01/02 19:48:51 safe +creation du fichier /etc/init.d/vzgot prise III + +#================================================================================= + +Revision 0.70.0.23 2010/01/02 19:48:01 safe +creation du fichier /etc/init.d/vzgot prise II + +#================================================================================= + +Revision 0.70.0.22 2010/01/02 19:38:33 safe +creation du fichier /etc/init.d/vzgot + +#================================================================================= + +Revision 0.70.0.21 2010/01/02 14:58:18 safe +adjustemen shell prise II + +#================================================================================= + +Revision 0.70.0.20 2010/01/02 14:36:54 safe +creation du fichier VZLIB/vzsir/CONTNAME/status +adjustemen shell + +#================================================================================= + +Revision 0.70.0.19 2010/01/01 22:56:30 safe +correction format vzredoall (ajout d'un delais) + +#================================================================================= + +Revision 0.70.0.18 2010/01/01 22:55:26 safe +correction format vzredoall (ajout d'un delais) + +#================================================================================= + +Revision 0.70.0.17 2010/01/01 22:34:02 safe +correction format vzredoall (fc12 a la place de fc13!) + +#================================================================================= + +Revision 0.70.0.16 2010/01/01 20:44:31 safe +correction format vzredoall + +#================================================================================= + +Revision 0.70.0.15 2010/01/01 20:40:43 safe +mise en place du shell vzgot.redoall prise III + +#================================================================================= + +Revision 0.70.0.14 2010/01/01 20:14:53 safe +mise en place du shell vzgot.redoall prise II + +#================================================================================= + +Revision 0.70.0.13 2010/01/01 18:56:42 safe +mise en place du shell vzgot.redoall + +#================================================================================= + +Revision 0.70.0.12 2010/01/01 18:38:13 safe +prise en compte et affichage des information distribution et architecture + +#================================================================================= + +Revision 0.70.0.11 2010/01/01 16:54:15 safe +addition de etc/snmp/snmpd.conf prise III + +#================================================================================= + +Revision 0.70.0.10 2010/01/01 16:50:52 safe +addition de etc/snmp/snmpd.conf prise II + +#================================================================================= + +Revision 0.70.0.9 2010/01/01 16:47:19 safe +addition de etc/snmp/snmpd.conf + +#================================================================================= + +Revision 0.70.0.8 2010/01/01 15:37:39 safe +addition de etc/sudoers + +#================================================================================= + +Revision 0.70.0.7 2010/01/01 15:27:09 safe +addition de etc/sudoers + +#================================================================================= + +Revision 0.70.0.6 2010/01/01 15:23:03 safe +correction vzgot.fboot.redhat pour addition de users + +#================================================================================= + +Revision 0.70.0.5 2010/01/01 15:15:55 safe +correction vzgot.fboot.redhat + +#================================================================================= + +Revision 0.70.0.4 2010/01/01 15:10:59 safe +meilleur set de protection des fichiers + +#================================================================================= + +Revision 0.70.0.3 2010/01/01 15:08:06 safe +fichier de configuration resolv.conf + +#================================================================================= + +Revision 0.70.0.2 2010/01/01 15:05:33 safe +fichier de configuration shadow + +#================================================================================= + +Revision 0.70.0.1 2010/01/01 13:47:10 safe +meilleur fichier de configuration + +#================================================================================= + +Revision 0.70.0.0 2010/01/01 12:58:32 safe +Ratrapage numero de Version + +Revision 0.70 2010/01/01 12:58:32 safe +upgrade version + +Revision 0.6.0.20 2010/01/01 12:58:32 safe +33 distribution operationnel dans vzgot + +#================================================================================= + +Revision 0.6.0.19 2009/12/31 21:29:48 safe +ajustement de l'addition des RPM extra dans un container prise V + +#================================================================================= + +Revision 0.6.0.18 2009/12/31 21:27:38 safe +ajustement de l'addition des RPM extra dans un container prise IV + +#================================================================================= + +Revision 0.6.0.17 2009/12/31 21:18:34 safe +ajustement de l'addition des RPM extra dans un container prise III + +#================================================================================= + +Revision 0.6.0.16 2009/12/31 21:11:01 safe +ajustement de l'addition des RPM extra dans un container prise II + +#================================================================================= + +Revision 0.6.0.15 2009/12/31 21:00:43 safe +ajustement de l'addition des RPM extra dans un container + +#================================================================================= + +Revision 0.6.0.14 2009/12/31 20:23:55 safe +inclusion rpm iputils dans el4.7-ix86-64 + +#================================================================================= + +Revision 0.6.0.13 2009/12/31 17:45:07 safe +correction personlity pour x86_64 + +#================================================================================= + +Revision 0.6.0.12 2009/12/31 15:10:36 safe +correction vzgot.fboot.redhat, pour l'extraction des numero IP des alias + +#================================================================================= + +Revision 0.6.0.11 2009/12/31 03:12:54 safe +container el4.7 operationel + +#================================================================================= + +Revision 0.6.0.10 2009/12/31 00:43:44 safe +on prend en compte l'architecture Prise VII +definition de la variable LD_ASSUME_KERNEL + +#================================================================================= + +Revision 0.6.0.9 2009/12/31 00:41:23 safe +on prend en compte l'architecture Prise VI +definition de la variable LD_ASSUME_KERNEL + +#================================================================================= + +Revision 0.6.0.8 2009/12/31 00:22:20 safe +on prend en compte l'architecture Prise V + +#================================================================================= + +Revision 0.6.0.7 2009/12/30 19:29:48 safe +on prend en compte l'architecture Prise IV + +#================================================================================= + +Revision 0.6.0.6 2009/12/30 19:27:27 safe +on prend en compte l'architecture Prise III + +#================================================================================= + +Revision 0.6.0.5 2009/12/30 19:27:08 safe +on prend en compte l'architecture + +#================================================================================= + +Revision 0.6.0.4 2009/12/30 19:24:59 safe +on prend en compte l'architecture + +#================================================================================= + +Revision 0.6.0.3 2009/12/30 18:45:46 safe +Mise en place du traietemnt de l'architecture + +#================================================================================= + +Revision 0.6.0.2 2009/12/30 15:20:47 safe +verification problem RPM de rh9 + +#================================================================================= + +Revision 0.6.0.1 2009/12/30 15:18:18 safe +RPM pour rh9 + +#================================================================================= + +Revision 0.6.0.0 2009/12/30 15:04:54 safe +Ratrapage numero de Version + +Revision 0.6 2009/12/30 15:04:54 safe +upgrade version + +Revision 0.5.0.112 2009/12/30 15:04:54 safe +Passage a la versions 0.6 + +#================================================================================= + +Revision 0.5.0.111 2009/12/30 15:04:28 safe +inclusion de procps pour rh8.0 + +#================================================================================= + +Revision 0.5.0.110 2009/12/29 21:00:51 safe +verifications installation Prise II + +#================================================================================= + +Revision 0.5.0.109 2009/12/29 20:57:52 safe +verifications installation + +#================================================================================= + +Revision 0.5.0.108 2009/12/29 20:55:25 safe +debugging de vzgot.fboot.redhat prise XII + +#================================================================================= + +Revision 0.5.0.107 2009/12/29 20:49:15 safe +debugging de vzgot.fboot.redhat prise XI + +#================================================================================= + +Revision 0.5.0.106 2009/12/29 20:42:34 safe +debugging de vzgot.fboot.redhat prise X + +#================================================================================= + +Revision 0.5.0.105 2009/12/29 20:40:57 safe +debugging de vzgot.fboot.redhat prise IX + +#================================================================================= + +Revision 0.5.0.104 2009/12/29 20:37:12 safe +debugging de vzgot.fboot.redhat prise VIII + +#================================================================================= + +Revision 0.5.0.103 2009/12/29 20:31:46 safe +debugging de vzgot.fboot.redhat prise VII + +#================================================================================= + +Revision 0.5.0.102 2009/12/29 20:27:57 safe +debugging de vzgot.fboot.redhat prise VI + +#================================================================================= + +Revision 0.5.0.101 2009/12/29 20:16:14 safe +debugging de vzgot.fboot.redhat prise V + +#================================================================================= + +Revision 0.5.0.100 2009/12/29 20:12:58 safe +debugging de vzgot.fboot.redhat prise IV + +#================================================================================= + +Revision 0.5.0.99 2009/12/29 19:43:25 safe +debugging de vzgot.fboot.redhat prise III + +#================================================================================= + +Revision 0.5.0.98 2009/12/29 19:40:03 safe +debugging de vzgot.fboot.redhat prise II + +#================================================================================= + +Revision 0.5.0.97 2009/12/29 19:37:13 safe +debugging de vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.96 2009/12/29 19:25:53 safe +mise en place du repertoir etc + +#================================================================================= + +Revision 0.5.0.95 2009/12/28 21:33:55 safe +Ajustement du nom des interfaces veth prise VIII +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.94 2009/12/28 21:24:40 safe +Ajustement du nom des interfaces veth prise VII +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.93 2009/12/28 21:06:38 safe +Ajustement du nom des interfaces veth prise VI +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.92 2009/12/28 21:01:26 safe +Ajustement du nom des interfaces veth prise V +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.91 2009/12/28 21:00:28 safe +Ajustement du nom des interfaces veth prise IV +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.90 2009/12/28 20:49:31 safe +Ajustement du nom des interfaces veth prise III +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.89 2009/12/28 20:48:19 safe +Ajustement du nom des interfaces veth prise II +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.88 2009/12/28 20:42:38 safe +Ajustement du nom des interfaces veth +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.87 2009/12/28 20:20:14 safe +Creation du shell vzgot.mksrvz, prise V + +#================================================================================= + +Revision 0.5.0.86 2009/12/28 20:16:00 safe +Creation du shell vzgot.mksrvz, prise IV + +#================================================================================= + +Revision 0.5.0.85 2009/12/28 20:13:23 safe +Creation du shell vzgot.mksrvz, prise III + +#================================================================================= + +Revision 0.5.0.84 2009/12/28 20:08:51 safe +Creation du shell vzgot.mksrvz, prise II + +#================================================================================= + +Revision 0.5.0.83 2009/12/28 20:05:55 safe +Creation du shell vzgot.mksrvz + +#================================================================================= + +Revision 0.5.0.82 2009/12/28 16:01:21 safe +Mise en place la fonction destroy prise III + +#================================================================================= + +Revision 0.5.0.81 2009/12/28 15:59:31 safe +Mise en place la fonction destroy prise II + +#================================================================================= + +Revision 0.5.0.80 2009/12/28 15:55:38 safe +Mise en place la fonction destroy prise I + +#================================================================================= + +Revision 0.5.0.79 2009/12/28 15:36:35 safe +Mise en place la fonction create Prise X (fin) + +#================================================================================= + +Revision 0.5.0.78 2009/12/28 15:35:02 safe +Mise en place la fonction create Prise IX + +#================================================================================= + +Revision 0.5.0.77 2009/12/28 15:33:28 safe +Mise en place la fonction create Prise VIII + +#================================================================================= + +Revision 0.5.0.76 2009/12/28 15:31:56 safe +Mise en place la fonction create Prise VII + +#================================================================================= + +Revision 0.5.0.75 2009/12/28 04:02:07 safe +Mise en place la fonction create Prise VI + +#================================================================================= + +Revision 0.5.0.74 2009/12/28 03:58:31 safe +Mise en place la fonction create Prise V + +#================================================================================= + +Revision 0.5.0.73 2009/12/28 03:56:20 safe +Mise en place la fonction create Prise IV + +#================================================================================= + +Revision 0.5.0.72 2009/12/28 03:27:02 safe +Mise en place la fonction create Prise III + +#================================================================================= + +Revision 0.5.0.71 2009/12/28 03:23:49 safe +Mise en place la fonction create Prise II + +#================================================================================= + +Revision 0.5.0.70 2009/12/28 03:19:34 safe +Mise en place la fonction create + +#================================================================================= + +Revision 0.5.0.69 2009/12/27 03:22:00 safe +on met en place fastboot pour permettre le demarrage Prise II + +#================================================================================= + +Revision 0.5.0.68 2009/12/27 03:19:50 safe +on met en place fastboot pour permettre le demarrage + +#================================================================================= + +Revision 0.5.0.67 2009/12/27 02:49:30 safe +on revient en arriere sur Unsharing data. + +#================================================================================= + +Revision 0.5.0.66 2009/12/27 01:14:03 safe +Unsharing data (to avoid dmesg) Prise II + +#================================================================================= + +Revision 0.5.0.65 2009/12/27 01:12:46 safe +Unsharing data (to avoid dmesg) + +#================================================================================= + +Revision 0.5.0.64 2009/12/27 01:03:49 safe +Permission du privilege CAP_SYS_ADMIN +(permission de faire des mounts) + +#================================================================================= + +Revision 0.5.0.63 2009/12/27 00:50:35 safe +suppresion du privilege CAP_SYS_ADMIN, pour ne plus +avoir access a dmesg? + +#================================================================================= + +Revision 0.5.0.62 2009/12/23 01:07:09 safe +modification de la routine pour elever des privileges. +prctl(PR_CAPBSET_DROP,todrop[i],0,0,0) + +#================================================================================= + +Revision 0.5.0.61 2009/12/23 00:39:46 safe +Le container ne plus metrtre l'horloge system a jours +prctl (PR_CAPBSET_DROP,CAP_SYS_BOOT|CAP_SYS_TIME.....) + +#================================================================================= + +Revision 0.5.0.60 2009/12/20 14:45:33 safe +Correction du shell vzgot.fboot.redhat +ajout des informations dans fstab + +#================================================================================= + +Revision 0.5.0.59 2009/12/20 01:33:10 safe +Correction du shell vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.58 2009/12/20 01:30:48 safe +Correction du shell vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.57 2009/12/20 01:25:31 safe +Creation du shell vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.56 2009/12/20 01:25:14 safe +Creation du shell vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.55 2009/12/19 19:15:24 safe +ajustements VZLIB prise III + +#================================================================================= + +Revision 0.5.0.54 2009/12/19 19:13:21 safe +ajustements VZLIB + +#================================================================================= + +Revision 0.5.0.53 2009/12/19 19:10:41 safe +Correction path viarial config VZLIB + +#================================================================================= + +Revision 0.5.0.52 2009/12/19 19:08:32 safe +Correction path pour fichier locks + +#================================================================================= + +Revision 0.5.0.51 2009/12/19 19:06:47 safe +Correction des shell pour incluse vzdir prise II + +#================================================================================= + +Revision 0.5.0.50 2009/12/19 19:01:21 safe +Correction des shell pour incluse vzdir prise II + +#================================================================================= + +Revision 0.5.0.49 2009/12/19 18:59:14 safe +Correction des shell pour incluse vzdir + +#================================================================================= + +Revision 0.5.0.48 2009/12/19 18:50:34 safe +creation du repertoir /var/lib/vzgot/vzdir + +#================================================================================= + +Revision 0.5.0.47 2009/12/19 18:42:07 safe +deplacement des fichier shell dans /var/lib/vzgot/shell prise IV +on cherche dans /var/lib/vzgot, sans specifier le numero de version + +#================================================================================= + +Revision 0.5.0.46 2009/12/19 18:41:14 safe +deplacement des fichier shell dans /var/lib/vzgot/shell prise III +on cherche dans /var/lib/vzgot, sans specifier le numero de version + +#================================================================================= + +Revision 0.5.0.45 2009/12/19 18:39:44 safe +deplacement des fichier shell dans /var/lib/vzgot/shell prise II? + +#================================================================================= + +Revision 0.5.0.44 2009/12/19 18:36:13 safe +deplacement des fichier shell dans /var/lib/vzgot/shell + +#================================================================================= + +Revision 0.5.0.43 2009/12/19 05:48:05 safe +mise au point de vzgot.fboot prise I + +#================================================================================= + +Revision 0.5.0.42 2009/12/19 00:47:58 safe +Premier essais de vzgot.fboot prise XXIV + +#================================================================================= + +Revision 0.5.0.41 2009/12/19 00:46:28 safe +Premier essais de vzgot.fboot prise XXIII + +#================================================================================= + +Revision 0.5.0.40 2009/12/19 00:45:05 safe +Premier essais de vzgot.fboot prise XXII + +#================================================================================= + +Revision 0.5.0.39 2009/12/19 00:43:36 safe +Premier essais de vzgot.fboot prise XXI + +#================================================================================= + +Revision 0.5.0.38 2009/12/19 00:04:33 safe +Premier essais de vzgot.fboot prise XX + +#================================================================================= + +Revision 0.5.0.37 2009/12/19 00:01:11 safe +Premier essais de vzgot.fboot prise XIX + +#================================================================================= + +Revision 0.5.0.36 2009/12/18 23:58:43 safe +Premier essais de vzgot.fboot prise XVIII + +#================================================================================= + +Revision 0.5.0.35 2009/12/18 23:57:29 safe +Premier essais de vzgot.fboot prise XVII + +#================================================================================= + +Revision 0.5.0.34 2009/12/18 23:56:43 safe +Premier essais de vzgot.fboot prise XVI + +#================================================================================= + +Revision 0.5.0.33 2009/12/18 23:55:27 safe +Premier essais de vzgot.fboot prise XV + +#================================================================================= + +Revision 0.5.0.32 2009/12/18 23:51:57 safe +Premier essais de vzgot.fboot prise XIV + +#================================================================================= + +Revision 0.5.0.31 2009/12/18 23:51:02 safe +Premier essais de vzgot.fboot prise XIII + +#================================================================================= + +Revision 0.5.0.30 2009/12/16 03:56:29 safe +Premier essais de vzgot.fboot prise XII + +#================================================================================= + +Revision 0.5.0.29 2009/12/16 03:54:01 safe +Premier essais de vzgot.fboot prise XI + +#================================================================================= + +Revision 0.5.0.28 2009/12/16 03:39:20 safe +Premier essais de vzgot.fboot prise X + +#================================================================================= + +Revision 0.5.0.27 2009/12/16 03:35:44 safe +Premier essais de vzgot.fboot prise IX + +#================================================================================= + +Revision 0.5.0.26 2009/12/16 03:34:27 safe +Premier essais de vzgot.fboot prise VIII + +#================================================================================= + +Revision 0.5.0.25 2009/12/16 03:32:38 safe +Premier essais de vzgot.fboot prise VII + +#================================================================================= + +Revision 0.5.0.24 2009/12/16 03:29:19 safe +Premier essais de vzgot.fboot prise VI + +#================================================================================= + +Revision 0.5.0.23 2009/12/16 03:26:48 safe +Premier essais de vzgot.fboot prise V + +#================================================================================= + +Revision 0.5.0.22 2009/12/16 03:25:43 safe +Premier essais de vzgot.fboot prise IV + +#================================================================================= + +Revision 0.5.0.21 2009/12/16 03:23:55 safe +Premier essais de vzgot.fboot prise III + +#================================================================================= + +Revision 0.5.0.20 2009/12/16 03:21:27 safe +Premier essais de vzgot.fboot prise II + +#================================================================================= + +Revision 0.5.0.19 2009/12/16 03:16:08 safe +Premier essais de vzgot.fboot + +#================================================================================= + +Revision 0.5.0.18 2009/12/16 02:30:12 safe +insertion du nom de la distribution + +#================================================================================= + +Revision 0.5.0.17 2009/12/16 02:21:09 safe +modification appel a strcpy Prise II + +#================================================================================= + +Revision 0.5.0.16 2009/12/16 02:16:56 safe +modification appel a strcpy + +#================================================================================= + +Revision 0.5.0.15 2009/12/15 05:49:02 safe +creation de la command firstboot prise XIII + +#================================================================================= + +Revision 0.5.0.14 2009/12/15 05:48:06 safe +creation de la command firstboot prise XII + +#================================================================================= + +Revision 0.5.0.13 2009/12/15 05:45:59 safe +creation de la command firstboot prise XI + +#================================================================================= + +Revision 0.5.0.12 2009/12/15 05:42:20 safe +creation de la command firstboot prise X + +#================================================================================= + +Revision 0.5.0.11 2009/12/15 05:40:30 safe +creation de la command firstboot prise IX + +#================================================================================= + +Revision 0.5.0.10 2009/12/15 05:39:32 safe +creation de la command firstboot prise VIII + +#================================================================================= + +Revision 0.5.0.9 2009/12/15 05:38:28 safe +creation de la command firstboot prise VII + +#================================================================================= + +Revision 0.5.0.8 2009/12/15 04:20:50 safe +creation de la command firstboot prise VI + +#================================================================================= + +Revision 0.5.0.7 2009/12/15 04:07:31 safe +creation de la command firstboot prise V + +#================================================================================= + +Revision 0.5.0.6 2009/12/15 04:05:02 safe +creation de la command firstboot prise IV + +#================================================================================= + +Revision 0.5.0.5 2009/12/15 03:26:48 safe +creation de la command firstboot prise III + +#================================================================================= + +Revision 0.5.0.4 2009/12/15 03:24:13 safe +creation de la command firstboot prise III + +#================================================================================= + +Revision 0.5.0.3 2009/12/15 03:20:08 safe +creation de la command firstboot prise III + +#================================================================================= + +Revision 0.5.0.2 2009/12/15 03:09:13 safe +creation de la command firstboot prise II + +#================================================================================= + +Revision 0.5.0.1 2009/12/15 03:01:35 safe +creation de la command firstboot + +#================================================================================= + +Revision 0.5.0.0 2009/12/14 15:07:23 safe +Ratrapage numero de Version + +Revision 0.5 2009/12/14 15:07:23 safe +upgrade version + +Revision 0.4.0.16 2009/12/14 15:07:23 safe +version de vzgot globalement operationnel + +#================================================================================= + +Revision 0.4.0.15 2009/12/14 15:04:51 safe +problem de kill prise IX (Le crash semble lie au kernel) + +#================================================================================= + +Revision 0.4.0.14 2009/12/14 14:55:05 safe +problem de kill prise VIII (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.13 2009/12/14 14:52:56 safe +problem de kill prise VII (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.12 2009/12/14 14:46:13 safe +problem de kill prise VI (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.11 2009/12/14 04:10:38 safe +problem de kill prise V (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.10 2009/12/14 04:04:42 safe +problem de kill prise IV (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.9 2009/12/14 03:56:28 safe +problem de kill prise III (detection de process courant) + +#================================================================================= + +Revision 0.4.0.8 2009/12/14 03:38:30 safe +problem de kill prise II (le numero n'etait pas le bon) + +#================================================================================= + +Revision 0.4.0.7 2009/12/14 03:38:16 safe +problem de kill prise II (le numero n'etait pas le bon) + +#================================================================================= + +Revision 0.4.0.6 2009/12/14 03:26:50 safe +problem de kill + +#================================================================================= + +Revision 0.4.0.5 2009/12/14 03:23:54 safe +divedivedive etait toujours mal place mal place + +#================================================================================= + +Revision 0.4.0.4 2009/12/14 03:18:01 safe +divedivedive etaitt mal place + +#================================================================================= + +Revision 0.4.0.3 2009/12/14 03:08:00 safe +verification fonctionnement vzgot avec /bin/bash prise II + +#================================================================================= + +Revision 0.4.0.2 2009/12/14 03:05:30 safe +verification fonctionnement vzgot avec /bin/bash + +#================================================================================= + +Revision 0.4.0.1 2009/12/14 02:59:28 safe +essais du vz shutdown + +#================================================================================= + +Revision 0.4.0.0 2009/12/13 20:20:32 safe +Ratrapage numero de Version + +Revision 0.4 2009/12/13 20:20:32 safe +upgrade version + +Revision 0.2.0.71 2009/12/13 20:20:32 safe +device close et vzgot boot operationel + +#================================================================================= + +Revision 0.2.0.70 2009/12/13 20:15:50 safe +closing device... prise VI + +#================================================================================= + +Revision 0.2.0.69 2009/12/13 20:13:17 safe +closing device... prise V + +#================================================================================= + +Revision 0.2.0.68 2009/12/13 20:04:57 safe +closing device... prise IV + +#================================================================================= + +Revision 0.2.0.67 2009/12/13 20:00:56 safe +closing device... prise III + +#================================================================================= + +Revision 0.2.0.66 2009/12/13 19:51:29 safe +closing device... + +#================================================================================= + +Revision 0.2.0.65 2009/12/13 19:47:03 safe +eliminer le reboot du host par le container (prctl) + +#================================================================================= + +Revision 0.2.0.64 2009/12/13 05:21:44 safe +eliminer le reboot du host par le container (prctl) + +#================================================================================= + +Revision 0.2.0.63 2009/12/13 04:27:17 safe +Verification gestion des signaux Prise IV + +#================================================================================= + +Revision 0.2.0.62 2009/12/13 04:22:40 safe +Verification gestion des signaux Prise III + +#================================================================================= + +Revision 0.2.0.61 2009/12/13 04:17:44 safe +Verification gestion des signaux Prise II + +#================================================================================= + +Revision 0.2.0.60 2009/12/13 03:48:18 safe +Verification gestion des signaux + +#================================================================================= + +Revision 0.2.0.59 2009/12/13 03:25:40 safe +Interception des signaux SIGQUIT,SIGINT et SIGTERM Prise II + +#================================================================================= + +Revision 0.2.0.58 2009/12/13 01:45:07 safe +Interception des signaux SIGQUIT,SIGINT et SIGTERM + +#================================================================================= + +Revision 0.2.0.57 2009/12/13 01:11:31 safe +Gestion du routage up and down + +#================================================================================= + +Revision 0.2.0.56 2009/12/13 00:48:00 safe +mise en place du routage des numero IP utilise par +le container + +#================================================================================= + +Revision 0.2.0.55 2009/12/12 20:10:18 safe +on revient a la config veth + +#================================================================================= + +Revision 0.2.0.54 2009/12/12 20:08:44 safe +la configuration macvlan ne semble aller nul part + +#================================================================================= + +Revision 0.2.0.53 2009/12/12 11:33:01 safe +test de la configuration avec des interface de type macvlan prise IV + +#================================================================================= + +Revision 0.2.0.52 2009/12/12 11:31:29 safe +test de la configuration avec des interface de type macvlan prise III + +#================================================================================= + +Revision 0.2.0.51 2009/12/12 11:30:41 safe +test de la configuration avec des interface de type macvlan prise II + +#================================================================================= + +Revision 0.2.0.50 2009/12/12 11:28:31 safe +test de la configuration avec des interface de type macvlan + +#================================================================================= + +Revision 0.2.0.49 2009/12/11 22:09:00 safe +mise en route de vzgot.start, declaration de ETHNAME dans la config + +#================================================================================= + +Revision 0.2.0.48 2009/12/11 22:04:34 safe +mise en route de vzgot.start + +#================================================================================= + +Revision 0.2.0.47 2009/12/11 21:24:54 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise VIII + +#================================================================================= + +Revision 0.2.0.46 2009/12/11 21:22:45 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise VII + +#================================================================================= + +Revision 0.2.0.45 2009/12/11 21:20:29 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise VI + +#================================================================================= + +Revision 0.2.0.44 2009/12/11 21:17:23 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise V + +#================================================================================= + +Revision 0.2.0.43 2009/12/11 21:16:05 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise IV + +#================================================================================= + +Revision 0.2.0.42 2009/12/11 21:13:10 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise III + +#================================================================================= + +Revision 0.2.0.41 2009/12/11 21:05:29 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise II + +#================================================================================= + +Revision 0.2.0.40 2009/12/11 20:00:54 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container + +#================================================================================= + +Revision 0.2.0.39 2009/12/11 19:30:49 safe +test delay de wakup du VZ container + +#================================================================================= + +Revision 0.2.0.38 2009/12/11 03:43:19 safe +essais du pipe pour vzgot.init, prise VI + +#================================================================================= + +Revision 0.2.0.37 2009/12/11 03:34:29 safe +essais du pipe pour vzgot.init, prise V + +#================================================================================= + +Revision 0.2.0.36 2009/12/11 03:30:13 safe +essais du pipe pour vzgot.init, prise IV + +#================================================================================= + +Revision 0.2.0.35 2009/12/11 03:28:38 safe +essais du pipe pour vzgot.init, prise III + +#================================================================================= + +Revision 0.2.0.34 2009/12/11 03:26:13 safe +essais du pipe pour vzgot.init, prise II + +#================================================================================= + +Revision 0.2.0.33 2009/12/11 03:20:02 safe +premier essais du pipe pou vzgot.init + +#================================================================================= + +Revision 0.2.0.32 2009/12/10 20:11:47 safe +premier essait du fichier vzgot.init prise IV (test valeur de retour) + +#================================================================================= + +Revision 0.2.0.31 2009/12/10 20:07:17 safe +premier essait du fichier vzgot.init prise III (test valeur de retour) + +#================================================================================= + +Revision 0.2.0.30 2009/12/10 19:57:55 safe +premier essait du fichier vzgot.init prise II + +#================================================================================= + +Revision 0.2.0.29 2009/12/10 19:54:54 safe +premier essait du fichier vzgot.init + +#================================================================================= + +Revision 0.2.0.28 2009/12/10 19:49:27 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XV + +#================================================================================= + +Revision 0.2.0.27 2009/12/10 19:48:43 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XIV + +#================================================================================= + +Revision 0.2.0.26 2009/12/10 19:47:35 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XIII + +#================================================================================= + +Revision 0.2.0.25 2009/12/10 19:46:59 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XII + +#================================================================================= + +Revision 0.2.0.24 2009/12/10 19:44:55 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XI + +#================================================================================= + +Revision 0.2.0.23 2009/12/10 19:44:22 safe +verification update fichier config /etc/vzgoot/vzgot_config prise X + +#================================================================================= + +Revision 0.2.0.22 2009/12/10 19:43:41 safe +verification update fichier config /etc/vzgoot/vzgot_config prise IX + +#================================================================================= + +Revision 0.2.0.21 2009/12/10 19:42:37 safe +verification update fichier config /etc/vzgoot/vzgot_config prise VIII + +#================================================================================= + +Revision 0.2.0.20 2009/12/10 19:42:03 safe +verification update fichier config /etc/vzgoot/vzgot_config prise VII + +#================================================================================= + +Revision 0.2.0.19 2009/12/10 19:41:13 safe +verification update fichier config /etc/vzgoot/vzgot_config prise VI + +#================================================================================= + +Revision 0.2.0.18 2009/12/10 19:38:48 safe +verification update fichier config /etc/vzgoot/vzgot_config prise V + +#================================================================================= + +Revision 0.2.0.17 2009/12/10 19:37:26 safe +verification update fichier config /etc/vzgoot/vzgot_config prise IV + +#================================================================================= + +Revision 0.2.0.16 2009/12/10 19:36:24 safe +verification update fichier config /etc/vzgoot/vzgot_config prise III + +#================================================================================= + +Revision 0.2.0.15 2009/12/10 19:35:46 safe +verification update fichier config /etc/vzgoot/vzgot_config prise II + +#================================================================================= + +Revision 0.2.0.14 2009/12/10 19:33:52 safe +verification update fichier config /etc/vzgoot/vzgot_config + +#================================================================================= + +Revision 0.2.0.13 2009/12/10 19:32:34 safe +verification mod de vzgot.init + +#================================================================================= + +Revision 0.2.0.12 2009/12/10 19:31:02 safe +mise en place de vzgot_config + +#================================================================================= + +Revision 0.2.0.11 2009/12/10 03:51:34 safe +verification update + +#================================================================================= + +Revision 0.2.0.10 2009/12/10 03:37:42 safe +mise en place du repertoire shell + +#================================================================================= + +Revision 0.2.0.9 2009/12/08 22:45:02 safe +exploration de la mise en place reseau + +#================================================================================= + +Revision 0.2.0.8 2009/12/08 22:09:57 safe +Initialisation de /etc/mtab dans le container + +#================================================================================= + +Revision 0.2.0.7 2009/12/08 21:52:26 safe +mise en place du fichier PID. + +#================================================================================= + +Revision 0.2.0.6 2009/12/08 16:39:58 safe +test detachement direct prise V + +#================================================================================= + +Revision 0.2.0.5 2009/12/08 16:37:08 safe +test detachement direct prise IV + +#================================================================================= + +Revision 0.2.0.4 2009/12/08 16:32:55 safe +test detachement direct prise III + +#================================================================================= + +Revision 0.2.0.3 2009/12/08 16:31:08 safe +test detachement direct II + +#================================================================================= + +Revision 0.2.0.2 2009/12/08 16:28:37 safe +test detachement direct + +#================================================================================= + +Revision 0.2.0.1 2009/12/08 15:25:27 safe +test du kill du master (/sbin/init) + +#================================================================================= + +Revision 0.2.0.0 2009/12/08 05:08:35 safe +Ratrapage numero de Version + +Revision 0.2 2009/12/08 05:08:35 safe +upgrade version + +Revision 0.1.0.24 2009/12/08 05:08:35 safe +Upgrade des numeros de versions RCS + +#================================================================================= + +Revision 0.1.0.23 2009/12/08 04:28:50 safe +Upgrade des numero de versions RCS + +#================================================================================= + +Revision 0.1.0.22 2009/12/08 04:28:25 safe +Upgrade des numero de versions RCS + +Revision 0.1.0.21 2009/12/08 04:25:42 safe +Upgrade des numero de versions RCS + +#================================================================================= + +Revision 0.1.0.20 2009/12/08 04:20:53 safe +pivot_root operationnel, +fonctionne avec /bin/bash + +#================================================================================= + +Revision 0.1.0.19 2009/12/08 04:20:28 safe +pivot_root operationnel, +fonctionne avec /bin/bash + +#================================================================================= + +Revision 0.1.0.18 2009/12/08 04:19:30 safe +pivot_root operationnel, +fonctionne avec /bin/bash + +#================================================================================= + +Revision 0.1.0.17 2009/12/08 04:14:53 safe +test du pivot_root prise V (test OK?) + +#================================================================================= + +Revision 0.1.0.16 2009/12/08 04:10:59 safe +test du pivot_root prise IV + +#================================================================================= + +Revision 0.1.0.15 2009/12/08 04:09:00 safe +test du pivot_root prise III + +#================================================================================= + +Revision 0.1.0.14 2009/12/08 03:49:48 safe +test du pivot_root prise II + +#================================================================================= + +Revision 0.1.0.13 2009/12/08 03:47:44 safe +test du pivot_root prise I + +#================================================================================= + +Revision 0.1.0.12 2009/12/08 03:42:48 safe +le pivot_root est executable + +#================================================================================= + +Revision 0.1.0.11 2009/12/07 21:55:59 safe +test de vzboot sur delson prise IV +option + dans getopt + +#================================================================================= + +Revision 0.1.0.10 2009/12/07 21:46:18 safe +test de vzboot sur delson prise III + +#================================================================================= + +Revision 0.1.0.9 2009/12/07 21:44:42 safe +test de vzboot sur delson prise II + +#================================================================================= + +Revision 0.1.0.8 2009/12/07 21:41:51 safe +test de vzboot sur delson + +#================================================================================= + +Revision 0.1.0.7 2009/12/07 18:31:58 safe +definition du programme 'generic' vzgot qui +va faire les actions: boot,shutdown,freeze,warmup + +#================================================================================= + +Revision 0.1.0.6 2009/12/07 06:06:05 safe +capacite faire un lock du container + +#================================================================================= + +Revision 0.1.0.5 2009/12/07 03:49:10 safe +capacite de RPM, test deployement du rpm sur delson + +#================================================================================= + +Revision 0.1.0.4 2009/12/07 03:46:29 safe +capacite de RPM, test d'ebauche sur delson + +#================================================================================= + +Revision 0.1.0.3 2009/12/07 02:15:20 safe +inclusion de vzboot.c dans les RCS + +#================================================================================= + +Revision 0.1.0.2 2009/12/07 02:14:00 safe +ebauche du programme vzboot + +Revision 0.1.0.1 2009/12/07 02:14:00 safe +Ratrapage numero de Version + +Revision 0.1 2009/12/07 02:14:00 safe +Creation +#================================================================================= diff --git a/support/Makefile b/support/Makefile new file mode 100644 index 0000000..06a46b5 --- /dev/null +++ b/support/Makefile @@ -0,0 +1,31 @@ +#-------------------------------------------------------------------- +#Support directory Management +#-------------------------------------------------------------------- +clean : + @ for i in $(SUBDIRS) ; \ + do \ + echo doing "\"$$i $@\"" ; \ + $(MAKE) -s -C $$i $@ ; \ + done + + +sauve : + @ for i in $(SUBDIRS) ; \ + do \ + $(MAKE) -s -C $$i $@ ; \ + done + @ echo doing RCS on $(LOCDIR) + @ ../support/sauver $(SRC) + +#-------------------------------------------------------------------- +SRC= \ + vzgot.spec \ + Changes \ + sauver #must be last + +SUBDIRS= \ + +LOCDIR="support" +#=================================================================== +.PHONY: sauve clean +#-------------------------------------------------------------------- diff --git a/support/QUICK-START b/support/QUICK-START new file mode 100644 index 0000000..5d3b08f --- /dev/null +++ b/support/QUICK-START @@ -0,0 +1,253 @@ + + QUICK-START + + +This text describes the quick way to install a Linux container +using vzgot. Hopefully this step by step guide should help you +to setup a working example you can use to as a starting point +to install your other containers. + + +This procedure was performed and checked on a vanilla +Fedora 12 (without update), using kernel 2.6.31.5-127.fc12.x86_64. +Those step are done on the HOST system of your containers. + +All given command are 'command line' as such you will +have better feedback in case of trouble + +This procedure describes 5 easy steps to have your first container +up and running. + + +#=========================================================== +1 - Step one: Bridging, Forwarding, ARPing. + + Define a BRIDGE interface. Bridge interface is needed + to have the container connected to a network. + + Install needed bridge package using the yum command: + -> yum install bridge-utils + + Within the directory /etc/sysconfig/network-scripts create + a file named ifcfg-br0, and insert the following lines inside: + +#----------------------------------------------------------- +DEVICE=br0 +TYPE=Bridge +BOOTPROTO=static +IPADDR=your.own.ip.number +NETMASK=255.255.255.255 +ONBOOT=yes +USERCTL=no +DELAY=0 +STP=off +#----------------------------------------------------------- + once the file is saved, type: + + Type command: + -> service network restart + + Everything should be fine, doing command + -> ifconfig br0 + You should have a result such as: + +br0 Link encap:Ethernet HWaddr M:A:C:A:D:R + inet addr:Y.O.I.N Bcast:Y.O.I.N Mask:255.255.255.255 + inet6 addr: xxxx::xxxx:xxxx:xxxx:xxxx/64 Scope:Link + UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 + RX packets:0 errors:0 dropped:0 overruns:0 frame:0 + TX packets:21 errors:0 dropped:0 overruns:0 carrier:0 + collisions:0 txqueuelen:0 + RX bytes:0 (0.0 b) TX bytes:3822 (3.7 KiB) + + + Edit file /etc/sysctl.conf and change the line + net.ipv4.ip_forward = 0 + to + net.ipv4.ip_forward = 1 + ADD next 4 lines +#-- +#to allow Bridge to answer ARP request +net.ipv4.conf.br0.proxy_arp = 1 +#-- + to the sysctl.conf file end. + + Then input the command + -> sysctl -p + This allow the host to route packet from/to container. + + Using ping or other tools, make sure you are able to + reach Y.O.I.N from your internal network. + +#=========================================================== +2 - Step Two: LVM (OPTIONAL) + + We advise you to use LVM (Logical Volume Management). + This will allow you to define specific disk space to + your containers and increase size on the fly if + it is needed. + + For details, see Linux documentation about LVM. + + Critical command are: (Example) + pvcreate PhysicalVolume [[PhysicalVolume...] + vgcreate vzvol PhysicalVolume [[PhysicalVolume...] + lvcreate -l 100%PVS -nconvol vzvol PhysicalVolume [[PhysicalVolume...] + + NOTE: in our example the logical volume name is 'vzvol'. + +#=========================================================== +3 - Step Three Cgroup + + 'cgroup' are kernel functionalities to reduce + priviledges when working from inside containers. + (cpu usage, mknod allowing, etc..) + + You should have 'cgroup' available on the host kernel. + + add line: +cgroup /cgroup cgroup defaults 0 0 + in your HOST /etc/fstab file. + + do: + -> mount -a + -> ls /cgroup; command should return something like + +cpuacct.stat devices.deny +cpuacct.usage devices.list +cpuacct.usage_percpu memory.failcnt +cpu.rt_period_us memory.force_empty +cpu.rt_runtime_us memory.limit_in_bytes +cpuset.cpu_exclusive memory.max_usage_in_bytes +cpuset.cpus memory.memsw.failcnt +cpuset.mem_exclusive memory.memsw.limit_in_bytes +cpuset.mem_hardwall memory.memsw.max_usage_in_bytes +cpuset.memory_migrate memory.memsw.usage_in_bytes +cpuset.memory_pressure memory.stat +cpuset.memory_pressure_enabled memory.swappiness +cpuset.memory_spread_page memory.usage_in_bytes +cpuset.memory_spread_slab memory.use_hierarchy +cpuset.mems net_cls.classid +cpuset.sched_load_balance notify_on_release +cpuset.sched_relax_domain_level release_agent +cpu.shares tasks +devices.allow + + This means 'cgroup' is now operational on your system. + +#=========================================================== +4 - Step Four: vzgot + + Download vzgot (wget) and install it (rpm -Uhv) + + - you may need to adjust file in /etc/vzgot/vzgot_config + + LVM: + IF you have LVM device on the HOST, edit file + /etc/vzgot/vzgot_config and comment out the + variable: + LVM=vzvol + 'vzvol' is the name used when you created your + logical volume, if you used another name, set + LVM value accordingly. + If you do not have LVM, keep LVM commented in. + LVM_SIZE is the size used to create container + (2Gig was sufficient during our test). + + CGROUP: + in file /etc/vzgot/vzgot_config, you have a variable + CGROUP. Set it to a proper value if you had to set the + /cgroup directory somewhere else (ie: /dev/cgroup). + + If you do NOT use LVM and cgroup is mounted on + /cgroup you have nothing to change in /etc/vzgot/vzgot_config. + + +#=========================================================== +5 - Step Five: choosing the distribution you want to install + + Download (wget) one of the distribution you want + to try from the http://download.openvz.org/template/precreated/ + or from the vzgot site. + + As a demo, the file /etc/vzgot/vzgot_list, give you the choice + of 3 distributions, centos-5, Fedora-12, Ubuntu9.04. + choose one of them and download the needed tar.gz file within + the director /var/lib/vzgot/vztemplate directory. + + Configuration file /etc/vzgot/vzgot_list give you 3 containers + name related to each distribution (dflt-ctos-5,dflt-fc12, + dflt-ubu9.4), If for example, you choosed dflt-ctos-5, you need + to have file centos-5-x86.tar.gz available in the vztemplate + directory. + + Before you proceed, you MUST assign an IP to your container + name, change your DNS and define dflt-ctos-5.ydomain.name + with an IP. Once this is done, make sure + hostname dflt-ctos-5.ydomain.name is resolved to an IP AND that IP + is being routed to the host application + + Be sure command 'dnsdomainname' is returning your + domainname on your (physical) Host. + + Then proceed to create, firstboot and boot the container, + type the command: + + -> vzgot.mksrvz dflt-ctos-5 + + If successful, input the command: + -> ps axww | grep vzgot + + should display something like: + 0:00 vzgot: container dflt-ctos-5 (el5.3/i386) up + + This means your first container is up and running. + + Lets prove this. From a station within your network + try: + + -> ping dflt-ctos-5 + Answer should be + 64 bytes from dflt-ctos-5.your.domain (Y.O.I.N): icmp_seq=22 ttl=63 time=0.xx ms + + This prove your container is connected to your network + + Next but not the least + + -> ssh -Y -t -l root dflt-ctos-5.your.domain + the requested root password is the same as one you are using on your HOST. + + Once the container, commad + -> ps ax + will display something like + +PID TTY STAT TIME COMMAND + 1 ? Ss 0:00 init [3] + 276 ? Ss 0:00 syslogd -m 0 + 300 ? Ss 0:00 /usr/sbin/sshd + 322 ? Ss 0:00 sendmail: accepting connections + 331 ? Ss 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue + 341 ? Ss 0:00 /usr/sbin/httpd + 343 ? S 0:00 /usr/sbin/httpd + 350 ? Ss 0:00 crond + 358 ? Ss 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2 + 359 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2 + 367 ? Ss 0:00 sshd: root@pts/3 + 369 pts/3 Ss 0:00 -bash + 388 pts/3 R+ 0:00 ps ax + + + + Your Container is ALL SET. + (ET VOILA!) + + +Caution: dflt-ubu9.4 Note. + + If you choosed dflt-ubu9.4 to test your first container, you may + have trouble to connect to container via SSH if your HOST is in + "SELINUX=enforcing" mode. + + To bypass the problem, set /etc/selinux/config file + with SELINUX=disable and reboot the HOST. + diff --git a/support/QUICK-START.old b/support/QUICK-START.old new file mode 100644 index 0000000..09f9b66 --- /dev/null +++ b/support/QUICK-START.old @@ -0,0 +1,241 @@ + + QUICK-START + + +this text describe the quick way to install Linux container +using vzgot. Hopefully this step by step should help you +to setup a working example you can use to as starting point +to install you own other container. + + +This procedure was performed and checked on a vanilla +Fedora 12 (without update), using kernel 2.6.31.5-127.fc12.x86_64. +Those step are done on the HOST system of your containers. + +All given command are 'command line' such you +have better feed back in case of trouble + +This procedure describe 5 easy steps to have your first container +up and running. + + +#=========================================================== +1 - Step one: Bridging, Forwarding, ARPing. + + Define a BRIDGE interface. Bridge interface is need + to have container connected to network. + + Install needed bridge package using yum command: + -> yum install bridge-utils + + Within directory /etc/sysconfig/network-scripts create + a file named ifcfg-br0, contents of the file will be: + +#----------------------------------------------------------- +DEVICE=br0 +TYPE=Bridge +BOOTPROTO=static +IPADDR=your.own.ip.number +NETMASK=255.255.255.255 +ONBOOT=yes +USERCTL=no +DELAY=0 +STP=off +#----------------------------------------------------------- + once the file saved, type: + + Type command: + -> service network restart + + Everything should be fine, doing command + -> ifconfig br0 + You should have result as: + +br0 Link encap:Ethernet HWaddr M:A:C:A:D:R + inet addr:Y.O.I.N Bcast:Y.O.I.N Mask:255.255.255.255 + inet6 addr: xxxx::xxxx:xxxx:xxxx:xxxx/64 Scope:Link + UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 + RX packets:0 errors:0 dropped:0 overruns:0 frame:0 + TX packets:21 errors:0 dropped:0 overruns:0 carrier:0 + collisions:0 txqueuelen:0 + RX bytes:0 (0.0 b) TX bytes:3822 (3.7 KiB) + + + Edit file /etc/sysctl.conf and change line + net.ipv4.ip_forward = 0 + to + net.ipv4.ip_forward = 1 + ADD next 4 lines +#-- +#to allow Bridge to answer ARP request +net.ipv4.conf.br0.proxy_arp = 1 +#-- + to the sysctl.conf file end + + then command + -> sysctl -p + This allow the host to route packet from/to container. + + Using ping or other tools make sur your are able to + reach Y.O.I.N from your internal network. + +#=========================================================== +2 - Step Two: LVM (OPTIONAL) + + We advise you to use LVM (Logical Volume Management). + This will allow to define specific disk space to + your containers and increase size on the fly if + needed. + + For detail, see Linux documentation about LVM. + + Critical command are: (Example) + pvcreate PhysicalVolume [[PhysicalVolume...] + vgcreate [Volname] PhysicalVolume [[PhysicalVolume...] + lvcreate -l 100%PVS -nvzvol volname PhysicalVolume [[PhysicalVolume...] + + NOTE: in our example the logical volume name is 'vzvol' + +#=========================================================== +3 - Step Three Cgroup + + 'cgroup' are kernel functionalities to reduce + priviledges when working from inside containers. + (cpu usage, mknod allowing, etc..) + + You should have 'cgroup' available with host kernel. + + add line: +cgroup /cgroup cgroup defaults 0 0 + in your HOST /etc/fstab file. + + do: + -> mount -a + -> ls /cgroup; command should return something like + +cpuacct.stat devices.deny +cpuacct.usage devices.list +cpuacct.usage_percpu memory.failcnt +cpu.rt_period_us memory.force_empty +cpu.rt_runtime_us memory.limit_in_bytes +cpuset.cpu_exclusive memory.max_usage_in_bytes +cpuset.cpus memory.memsw.failcnt +cpuset.mem_exclusive memory.memsw.limit_in_bytes +cpuset.mem_hardwall memory.memsw.max_usage_in_bytes +cpuset.memory_migrate memory.memsw.usage_in_bytes +cpuset.memory_pressure memory.stat +cpuset.memory_pressure_enabled memory.swappiness +cpuset.memory_spread_page memory.usage_in_bytes +cpuset.memory_spread_slab memory.use_hierarchy +cpuset.mems net_cls.classid +cpuset.sched_load_balance notify_on_release +cpuset.sched_relax_domain_level release_agent +cpu.shares tasks +devices.allow + + This means 'cgroup' is now operational on your system. + +#=========================================================== +4 - Step Four: vzgot + + Download vzgot (wget) and install it (rpm -Uhv) + + - you may need to adjust file /etc/vzgot/vzgot_config + + LVM: + IF you have LVM device on the HOST, edit file + /etc/vzgot/vzgot_config and comment out the + variable: + LVM=vzvol + 'vzvol' is the name used when you created your + logical volume, if you used another name, set + LVM value accordingly. + If you do not have LVM, keep LVM commented in. + LVM_SIZE is the size used to create container + (2Gig was found big enough). + + CGROUP: + in file /etc/vzgot/vzgot_config, you have a variable + CGROUP set it to proper value if you had set the + /cgroup directory somewhere else (ie: /dev/cgroup) + + If you do NOT use LVM and cgroup is mounted on + /cgroup you have nothing to change in /etc/vzgot/vzgot_config + + +#=========================================================== +5 - Step Five: choosing the distribution you want to install + + Download (wget) one of the distribution you want + to try from the http://download.openvz.org/template/precreated/ + or from the vzgot site. + + As demo, the file /etc/vzgot/vzgot_list, give you the choice + of 3 distributions, centos-5, Fedora-12, Ubuntu9.04. + choose one of them and download the needed tar.gz file within + the director /var/lib/vzgot/vztemplate directory. + + Configuration file /etc/vzgot/vzgot_list give you 3 containers + name related to each distribution (dflt-ctos-5,dflt-fc12, + dflt-ubu9.4), lets say you choosed dflt-ctos-5, you need + to have file centos-5-x86.tar.gz available in the vztemplate + directory. + + Before to proceed, you MUST assign an IP to your container + name, change your DNS and define dflt-ctos-5.ydomain.name + with an IP. Once done make sure hostname dflt-ctos-5.ydomain.name + is resolved to an IP AND the IP routed to the host application + + Be sure command 'dnsdomainname' is returning your + domainname on your (physical) Host. + + Then proceed to create, firstboot and boot the container, + type the command + + -> vzgot.mksrvz dflt-ctos-5 + + If successful command: + -> ps axww | grep vzgot + + should display something like: + 0:00 vzgot: container dflt-ctos-5 (el5.3/i386) up + + This means your first container is up and running. + + Lets prove this. From a station within your network + try: + + -> ping dflt-ctos-5 + Answer should be + 64 bytes from dflt-ctos-5.your.domain (Y.O.I.N): icmp_seq=22 ttl=63 time=0.xx ms + + This prove your container is connected to your network + + Next but not the least + + -> ssh -Y -t -l root dflt-ctos-5.your.domain + the requested root password is the same as one you are using on your HOST. + + Once the container, commad + -> ps ax + will display something like + +PID TTY STAT TIME COMMAND + 1 ? Ss 0:00 init [3] + 276 ? Ss 0:00 syslogd -m 0 + 300 ? Ss 0:00 /usr/sbin/sshd + 322 ? Ss 0:00 sendmail: accepting connections + 331 ? Ss 0:00 sendmail: Queue runner@01:00:00 for /var/spool/clientmqueue + 341 ? Ss 0:00 /usr/sbin/httpd + 343 ? S 0:00 /usr/sbin/httpd + 350 ? Ss 0:00 crond + 358 ? Ss 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2 + 359 ? S 0:00 /usr/sbin/saslauthd -m /var/run/saslauthd -a pam -n 2 + 367 ? Ss 0:00 sshd: root@pts/3 + 369 pts/3 Ss 0:00 -bash + 388 pts/3 R+ 0:00 ps ax + + + + Your Container is ALL SET. + (ET VOILA!) diff --git a/support/RCS/Changes,v b/support/RCS/Changes,v new file mode 100644 index 0000000..45fd85b --- /dev/null +++ b/support/RCS/Changes,v @@ -0,0 +1,4651 @@ +head 0.84; +access; +symbols; +locks + jmp:0.84.0.0; strict; +comment @# @; + + +0.84 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.84.0.0; +next 0.83; + +0.83 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.83.0.0; +next ; + +0.83.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next 0.83.0.1; + +0.83.0.1 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + +0.84.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + + +desc +@#Log des mises a jour RCS +#--------------------------------------------------------------------------------- +#Ce fichier est pour tracer les changements fait dans le developpement +#de MentorX +$Log: Changes,v $ +Revision 0.84.0.0 2010/03/06 16:38:31 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:38:31 jmp +upgrade version + +Revision 0.83.0.1 2010/03/06 16:38:31 jmp +Mise en place su GIT + +Revision 0.83.0.0 2010/03/06 16:38:31 jmp +Ratrapage numero de Version + +Revision 0.83 2010/03/06 16:38:31 jmp +Creation +#================================================================================= + +Revision 0.84.0.0 2010/03/06 16:36:51 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:36:51 jmp +upgrade version + +Revision 0.83.0.2 2010/03/06 16:36:51 jmp +Mise en place su GIT + +Revision 0.83.0.1 2010/03/06 16:36:51 jmp +Ratrapage numero de Version + +Revision 0.83 2010/03/06 16:36:51 jmp +Creation +#================================================================================= + +Revision 0.84.0.1 2010/03/06 16:36:32 jmp +Mise en place su GIT + +Revision 0.84.0.0 2010/03/06 16:36:32 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:36:32 jmp +Creation +#================================================================================= + +Revision 0.84.0.0 2010/03/06 16:36:03 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:36:03 jmp +upgrade version + +Revision 0.83.0.8 2010/03/06 16:36:03 jmp +Mise en place su GIT + +Revision 0.83.0.7 2010/03/06 16:36:03 jmp +Ratrapage numero de Version + +Revision 0.83 2010/03/06 16:36:03 jmp +Creation +#================================================================================= + +Revision 0.83.0.7 2010/02/18 14:28:22 safe +Suppression de la definition de CLONE_SYSLOG + +#================================================================================= + +Revision 0.83.0.6 2010/02/15 21:03:45 safe +itest de fonctionnement de syslog sans CLONE_SYSLOG + +#================================================================================= + +Revision 0.83.0.5 2010/02/15 21:02:28 safe +itest de fonctionnement de syslog sans CLONE_SYSLOG + +#================================================================================= + +Revision 0.83.0.4 2010/02/15 17:13:54 safe +creation d'un clone avec CLONE_SYSLOG + +#================================================================================= + +Revision 0.83.0.3 2010/02/10 02:50:09 safe +creation d'un clone avec CLONE_NEWUSER + +#================================================================================= + +Revision 0.83.0.2 2010/02/01 18:44:35 safe +Modification de la copie des clefs dans fboot.{redhat,debian} +prise II + +#================================================================================= + +Revision 0.83.0.1 2010/02/01 18:32:54 safe +Modification de la copie des clefs dans fboot.{redhat,debian} + +#================================================================================= + +Revision 0.83.0.0 2010/01/12 15:36:45 safe +Ratrapage numero de Version + +Revision 0.83 2010/01/12 15:36:45 safe +upgrade version + +Revision 0.82.0.27 2010/01/12 15:36:45 safe +release + +#================================================================================= + +Revision 0.82.0.26 2010/01/12 15:25:05 safe +Correction dans champ i386 manquant dans vxgot_list (rhel4) + +#================================================================================= + +Revision 0.82.0.25 2010/01/12 13:54:15 safe +Correction dans champ i386 manquant dans vxgot_list + +#================================================================================= + +Revision 0.82.0.24 2010/01/12 05:24:32 safe +Correction dans vzgot.mksrvz, variable CPUARCH + +#================================================================================= + +Revision 0.82.0.23 2010/01/12 05:03:13 safe +ajustement useradd dans fboot.redhat prise IV + +#================================================================================= + +Revision 0.82.0.22 2010/01/12 05:00:21 safe +ajustement useradd dans fboot.redhat prise III + +#================================================================================= + +Revision 0.82.0.21 2010/01/12 04:57:53 safe +ajustement useradd dans fboot.redhat prise II + +#================================================================================= + +Revision 0.82.0.20 2010/01/12 04:53:56 safe +ajustement useradd dans fboot.redhat + +#================================================================================= + +Revision 0.82.0.19 2010/01/12 04:42:44 safe +modification fichier groups + +#================================================================================= + +Revision 0.82.0.18 2010/01/12 04:22:46 safe +extension du fichier vzgost_list +modification du script vzgot.redoall + +#================================================================================= + +Revision 0.82.0.17 2010/01/12 04:03:38 safe +inclusion du repertoire /var/lib/vzgot/etc/ssh + +#================================================================================= + +Revision 0.82.0.16 2010/01/11 21:06:32 safe +Test d'installation a partir de zero +gestion de udev pour les versions de type redhat prise III + +#================================================================================= + +Revision 0.82.0.15 2010/01/11 21:04:25 safe +Test d'installation a partir de zero +gestion de udev pour les versions de type redhat prise II + +#================================================================================= + +Revision 0.82.0.14 2010/01/11 21:01:58 safe +Test d'installation a partir de zero +gestion de udev pour les versions de type redhat + +#================================================================================= + +Revision 0.82.0.13 2010/01/11 20:49:55 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise IX + +#================================================================================= + +Revision 0.82.0.12 2010/01/11 20:47:00 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise VIII + +#================================================================================= + +Revision 0.82.0.11 2010/01/11 20:42:46 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise VII + +#================================================================================= + +Revision 0.82.0.10 2010/01/11 20:39:50 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise VI + +#================================================================================= + +Revision 0.82.0.9 2010/01/11 20:28:49 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise V + +#================================================================================= + +Revision 0.82.0.8 2010/01/11 20:26:32 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise IV + +#================================================================================= + +Revision 0.82.0.7 2010/01/11 20:19:25 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prose III + +#================================================================================= + +Revision 0.82.0.6 2010/01/11 20:15:35 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prose II + +#================================================================================= + +Revision 0.82.0.5 2010/01/11 20:13:47 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) + +#================================================================================= + +Revision 0.82.0.4 2010/01/11 20:08:15 safe +Test d'installation a partir de zero +ajustement shell script vzgot.mksrvz + +#================================================================================= + +Revision 0.82.0.3 2010/01/11 20:04:49 safe +Test d'installation a partir de zero +configuration de etc/shadow et etc/resolv.conf +a partir des informations du host. + +#================================================================================= + +Revision 0.82.0.2 2010/01/11 16:49:38 safe +Test d'installation a partir de zero +changement de vzgot.mxsrvz + +#================================================================================= + +Revision 0.82.0.1 2010/01/11 16:05:57 safe +Test d'installation a partir de zero +introduction de vzgot_list + +#================================================================================= + +Revision 0.82.0.0 2010/01/10 03:28:28 safe +Ratrapage numero de Version + +Revision 0.82 2010/01/10 03:28:28 safe +upgrade version + +Revision 0.81.0.12 2010/01/10 03:28:28 safe +Test d'installation a partir de zero + +#================================================================================= + +Revision 0.81.0.11 2010/01/09 15:38:30 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise XXI + +#================================================================================= + +Revision 0.81.0.10 2010/01/09 15:34:44 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise XX + +#================================================================================= + +Revision 0.81.0.9 2010/01/09 15:31:42 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise XIX + +#================================================================================= + +Revision 0.81.0.8 2010/01/09 14:57:24 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise VIII + +#================================================================================= + +Revision 0.81.0.7 2010/01/09 14:49:02 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise VII + +#================================================================================= + +Revision 0.81.0.6 2010/01/09 03:47:32 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise VI + +#================================================================================= + +Revision 0.81.0.5 2010/01/09 03:46:11 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise V + +#================================================================================= + +Revision 0.81.0.4 2010/01/09 03:41:05 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise IV + +#================================================================================= + +Revision 0.81.0.3 2010/01/09 03:30:32 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise III + +#================================================================================= + +Revision 0.81.0.2 2010/01/09 03:25:29 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise II + +#================================================================================= + +Revision 0.81.0.1 2010/01/09 03:20:34 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.81.0.0 2010/01/09 03:20:15 safe +Ratrapage numero de Version + +Revision 0.81 2010/01/09 03:20:15 safe +upgrade version + +Revision 0.79.0.1 2010/01/09 03:20:15 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.79.0.0 2010/01/09 03:16:25 safe +Ratrapage numero de Version + +Revision 0.79 2010/01/09 03:16:25 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.78 2010/01/09 03:16:06 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.77.0.1 2010/01/09 03:15:48 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.77.0.0 2010/01/08 18:37:09 safe +Ratrapage numero de Version + +Revision 0.77 2010/01/08 18:37:09 safe +upgrade version + +Revision 0.75.0.16 2010/01/08 18:37:09 safe +utilisation des partitions LVM + +#================================================================================= + +Revision 0.75.0.15 2010/01/08 04:44:44 safe +Probleme avec Debian ubu8.4, Prise V +problem useradd + +#================================================================================= + +Revision 0.75.0.14 2010/01/08 03:44:53 safe +Probleme avec Debian ubu8.4, Prise IV +changement de la routine de useradd pour ne pas cree +le home directory directement + +#================================================================================= + +Revision 0.75.0.13 2010/01/08 03:39:10 safe +Probleme avec Debian ubu8.4, Prise III +changement de la routine de useradd pour ne pas cree +le home directory directement + +#================================================================================= + +Revision 0.75.0.12 2010/01/08 03:35:54 safe +Probleme avec Debian ubu8.4, Prise II +changement de la routine de useradd pour ne pas cree +le home directory directement + +#================================================================================= + +Revision 0.75.0.11 2010/01/08 03:26:36 safe +Probleme avec Debian ubu8.4, +changement de la routine de useradd pour ne pas cree +le home directory directement + +#================================================================================= + +Revision 0.75.0.10 2010/01/07 20:31:44 safe +insertion de ubu9.4 comme apartenant a Debian +creation du repertoir /var/run/networking +modification devices.allow pour permerttre les devices PTS Prise II + +#================================================================================= + +Revision 0.75.0.9 2010/01/07 20:25:30 safe +insertion de ubu9.4 comme apartenant a Debian +creation du repertoir /var/run/networking +modification devices.allow pour permerttre les devices PTS + +#================================================================================= + +Revision 0.75.0.8 2010/01/07 20:05:55 safe +insertion de ubu9.4 comme apartenant a Debian + +#================================================================================= + +Revision 0.75.0.7 2010/01/07 18:56:34 safe +cgroup operationel, mise en place de iptables + +#================================================================================= + +Revision 0.75.0.6 2010/01/07 05:15:18 safe +Creation du repertoir cgroup.d et gestion Prise IV + +#================================================================================= + +Revision 0.75.0.5 2010/01/07 04:58:32 safe +Creation du repertoir cgroup.d et gestion Prise III + +#================================================================================= + +Revision 0.75.0.4 2010/01/06 21:05:28 safe +Creation du repertoir cgroup.d et gestion Prise II + +#================================================================================= + +Revision 0.75.0.3 2010/01/06 20:43:25 safe +Creation du repertoir cgroup.d et gestion + +#================================================================================= + +Revision 0.75.0.2 2010/01/06 03:11:33 safe +Creation du repertoire vztemplate + +#================================================================================= + +Revision 0.75.0.1 2010/01/06 02:52:01 safe +Mise en place de cgroup Prise II + +#================================================================================= + +Revision 0.75.0.0 2010/01/06 02:38:45 safe +Ratrapage numero de Version + +Revision 0.75 2010/01/06 02:38:45 safe +upgrade version + +Revision 0.71.0.19 2010/01/06 02:38:45 safe +Mise en place de cgroup + +#================================================================================= + +Revision 0.71.0.18 2010/01/05 05:25:39 safe +Container de type ubuntu Prise XXI (ajustement shell debian) + +#================================================================================= + +Revision 0.71.0.17 2010/01/05 05:19:55 safe +Container de type ubuntu Prise XX (ajustement shell debian) + +#================================================================================= + +Revision 0.71.0.16 2010/01/05 05:02:49 safe +Container de type ubuntu Prise XIX (ajustement shell debian) + +#================================================================================= + +Revision 0.71.0.15 2010/01/05 04:32:35 safe +Container de type ubuntu Prise VIII (ajustement shell debian) + +#================================================================================= + +Revision 0.71.0.14 2010/01/05 04:27:22 safe +Container de type ubuntu Prise VII (removing udev auto start) + +Mise en route Debian (Ubuntu) +- Template lxc-ubuntu-8.04-i386.tar.gz (stephane graber lxc) + le rootfs est mal positionner +- le fichier network est dans /etc/network/interface (a construire) +- removing udev family auto start + +#================================================================================= + +Revision 0.71.0.13 2010/01/05 01:18:58 safe +Container de type ubuntu Prise VI (correction setting reseau) + +#================================================================================= + +Revision 0.71.0.12 2010/01/04 23:27:58 safe +Container de type ubuntu Prise V (correction setting reseau) + +#================================================================================= + +Revision 0.71.0.11 2010/01/04 23:24:54 safe +Container de type ubuntu Prise IV (correction setting reseau) + +#================================================================================= + +Revision 0.71.0.10 2010/01/04 20:24:28 safe +Container de type ubuntu Prise III (corrction setting reseau) + +#================================================================================= + +Revision 0.71.0.9 2010/01/04 20:10:34 safe +Container de type unbutu Prise II (c'est un debian!) + +#================================================================================= + +Revision 0.71.0.8 2010/01/04 19:46:55 safe +Container de type unbutu Prise I + +#================================================================================= + +Revision 0.71.0.7 2010/01/04 18:53:15 safe +Ajustement spec file chkconfig + +#================================================================================= + +Revision 0.71.0.6 2010/01/04 16:11:34 safe +Inclusion de Change et affichage des resultats +de pipe en mode no debug + +#================================================================================= + +Revision 0.71.0.5 2010/01/04 16:07:38 safe +Inclusion de Change et affichage des resultats +de pipe en mode no debug + +#================================================================================= + +Revision 0.71.0.4 2010/01/04 15:45:34 safe +Inclusion de Change et affichage des resultats +de pipe en mode no debug + +#================================================================================= + +Revision 0.71.0.3 2010/01/04 02:13:12 safe +README Operationnel + +#================================================================================= + +Revision 0.71.0.2 2010/01/04 01:23:05 safe +ajout du README Prise II + +#================================================================================= + +Revision 0.71.0.1 2010/01/04 01:18:11 safe +ajout du README + +#================================================================================= + +Revision 0.71.0.0 2010/01/03 23:29:18 safe +Ratrapage numero de Version + +Revision 0.71 2010/01/03 23:29:18 safe +upgrade version + +Revision 0.70.0.85 2010/01/03 23:29:18 safe +service vzgot start est operationnel + +#================================================================================= + +Revision 0.70.0.84 2010/01/03 22:24:19 safe +mise en place d'une console prise XXVII + +#================================================================================= + +Revision 0.70.0.83 2010/01/03 22:13:15 safe +mise en place d'une console prise XXVI + +#================================================================================= + +Revision 0.70.0.82 2010/01/03 22:07:54 safe +mise en place d'une console prise XXV + +#================================================================================= + +Revision 0.70.0.81 2010/01/03 22:04:37 safe +mise en place d'une console prise XXIV + +#================================================================================= + +Revision 0.70.0.80 2010/01/03 21:58:41 safe +mise en place d'une console prise XXIII + +#================================================================================= + +Revision 0.70.0.79 2010/01/03 21:46:32 safe +mise en place d'une console prise XXII + +#================================================================================= + +Revision 0.70.0.78 2010/01/03 21:41:28 safe +mise en place d'une console prise XXI + +#================================================================================= + +Revision 0.70.0.77 2010/01/03 21:26:54 safe +mise en place d'une console prise XX + +#================================================================================= + +Revision 0.70.0.76 2010/01/03 21:24:07 safe +mise en place d'une console prise XIX + +#================================================================================= + +Revision 0.70.0.75 2010/01/03 21:22:55 safe +mise en place d'une console prise XVIII + +#================================================================================= + +Revision 0.70.0.74 2010/01/03 21:20:18 safe +mise en place d'une console prise XVII + +#================================================================================= + +Revision 0.70.0.73 2010/01/03 21:16:08 safe +mise en place d'une console prise XVI + +#================================================================================= + +Revision 0.70.0.72 2010/01/03 21:14:20 safe +mise en place d'une console prise XV + +#================================================================================= + +Revision 0.70.0.71 2010/01/03 21:11:26 safe +mise en place d'une console prise XIV + +#================================================================================= + +Revision 0.70.0.70 2010/01/03 19:48:04 safe +mise en place d'une console prise XIII + +#================================================================================= + +Revision 0.70.0.69 2010/01/03 19:45:36 safe +mise en place d'une console prise XII + +#================================================================================= + +Revision 0.70.0.68 2010/01/03 19:30:24 safe +mise en place d'une console prise XI + +#================================================================================= + +Revision 0.70.0.67 2010/01/03 19:27:53 safe +mise en place d'une console prise X + +#================================================================================= + +Revision 0.70.0.66 2010/01/03 18:18:31 safe +mise en place d'une console prise IX + +#================================================================================= + +Revision 0.70.0.65 2010/01/03 18:10:15 safe +mise en place d'une console prise VIII + +#================================================================================= + +Revision 0.70.0.64 2010/01/03 18:07:47 safe +mise en place d'une console prise VII + +#================================================================================= + +Revision 0.70.0.63 2010/01/03 18:06:06 safe +mise en place d'une console prise VI + +#================================================================================= + +Revision 0.70.0.62 2010/01/03 18:04:44 safe +mise en place d'une console prise V + +#================================================================================= + +Revision 0.70.0.61 2010/01/03 18:01:26 safe +mise en place d'une console prise IV + +#================================================================================= + +Revision 0.70.0.60 2010/01/03 17:59:22 safe +mise en place d'une console prise III + +#================================================================================= + +Revision 0.70.0.59 2010/01/03 17:57:44 safe +mise en place d'une console prise II + +#================================================================================= + +Revision 0.70.0.58 2010/01/03 17:53:48 safe +mise en place d'une console prise I + +#================================================================================= + +Revision 0.70.0.57 2010/01/03 06:29:35 safe +traitement problem de message au demarrage boot systeme Prise IX + +#================================================================================= + +Revision 0.70.0.56 2010/01/03 06:27:02 safe +traitement problem de message au demarrage boot systeme Prise VIII + +#================================================================================= + +Revision 0.70.0.55 2010/01/03 06:22:27 safe +traitement problem de message au demarrage boot systeme Prise VII + +#================================================================================= + +Revision 0.70.0.54 2010/01/03 06:20:50 safe +traitement problem de message au demarrage boot systeme Prise VI + +#================================================================================= + +Revision 0.70.0.53 2010/01/03 06:17:25 safe +traitement problem de message au demarrage boot systeme Prise V + +#================================================================================= + +Revision 0.70.0.52 2010/01/03 06:13:23 safe +traitement problem de message au demarrage boot systeme Prise IV + +#================================================================================= + +Revision 0.70.0.51 2010/01/03 06:11:29 safe +traitement problem de message au demarrage boot systeme Prise III + +#================================================================================= + +Revision 0.70.0.50 2010/01/03 06:06:49 safe +traitement problem de message au demarrage boot systeme Prise II + +#================================================================================= + +Revision 0.70.0.49 2010/01/03 05:53:08 safe +traitement problem de message au demarrage boot systeme Prise I + +#================================================================================= + +Revision 0.70.0.48 2010/01/03 04:50:29 safe +traitement problem de message au demarrage boot systeme + +#================================================================================= + +Revision 0.70.0.47 2010/01/03 01:30:05 safe +creation du fichier /etc/init.d/vzgot prise XXVI + +#================================================================================= + +Revision 0.70.0.46 2010/01/03 01:28:52 safe +creation du fichier /etc/init.d/vzgot prise XXV + +#================================================================================= + +Revision 0.70.0.45 2010/01/03 01:25:37 safe +creation du fichier /etc/init.d/vzgot prise XXIV + +#================================================================================= + +Revision 0.70.0.44 2010/01/03 01:23:25 safe +creation du fichier /etc/init.d/vzgot prise XXIII + +#================================================================================= + +Revision 0.70.0.43 2010/01/03 01:17:40 safe +creation du fichier /etc/init.d/vzgot prise XXII + +#================================================================================= + +Revision 0.70.0.42 2010/01/02 21:18:57 safe +creation du fichier /etc/init.d/vzgot prise XXI + +#================================================================================= + +Revision 0.70.0.41 2010/01/02 21:16:38 safe +creation du fichier /etc/init.d/vzgot prise XX + +#================================================================================= + +Revision 0.70.0.40 2010/01/02 20:57:02 safe +creation du fichier /etc/init.d/vzgot prise XIX + +#================================================================================= + +Revision 0.70.0.39 2010/01/02 20:28:55 safe +creation du fichier /etc/init.d/vzgot prise XVIII + +#================================================================================= + +Revision 0.70.0.38 2010/01/02 20:28:18 safe +creation du fichier /etc/init.d/vzgot prise XVII + +#================================================================================= + +Revision 0.70.0.37 2010/01/02 20:26:56 safe +creation du fichier /etc/init.d/vzgot prise XVI + +#================================================================================= + +Revision 0.70.0.36 2010/01/02 20:23:55 safe +creation du fichier /etc/init.d/vzgot prise XV + +#================================================================================= + +Revision 0.70.0.35 2010/01/02 20:21:19 safe +creation du fichier /etc/init.d/vzgot prise XIV + +#================================================================================= + +Revision 0.70.0.34 2010/01/02 20:20:09 safe +creation du fichier /etc/init.d/vzgot prise XIII + +#================================================================================= + +Revision 0.70.0.33 2010/01/02 20:16:04 safe +creation du fichier /etc/init.d/vzgot prise XII + +#================================================================================= + +Revision 0.70.0.32 2010/01/02 20:11:37 safe +creation du fichier /etc/init.d/vzgot prise XI + +#================================================================================= + +Revision 0.70.0.31 2010/01/02 20:10:25 safe +creation du fichier /etc/init.d/vzgot prise X + +#================================================================================= + +Revision 0.70.0.30 2010/01/02 20:09:17 safe +creation du fichier /etc/init.d/vzgot prise IX + +#================================================================================= + +Revision 0.70.0.29 2010/01/02 20:03:58 safe +creation du fichier /etc/init.d/vzgot prise VIII + +#================================================================================= + +Revision 0.70.0.28 2010/01/02 20:00:40 safe +creation du fichier /etc/init.d/vzgot prise VII + +#================================================================================= + +Revision 0.70.0.27 2010/01/02 19:59:14 safe +creation du fichier /etc/init.d/vzgot prise VI + +#================================================================================= + +Revision 0.70.0.26 2010/01/02 19:58:16 safe +creation du fichier /etc/init.d/vzgot prise V + +#================================================================================= + +Revision 0.70.0.25 2010/01/02 19:49:31 safe +creation du fichier /etc/init.d/vzgot prise IV + +#================================================================================= + +Revision 0.70.0.24 2010/01/02 19:48:51 safe +creation du fichier /etc/init.d/vzgot prise III + +#================================================================================= + +Revision 0.70.0.23 2010/01/02 19:48:01 safe +creation du fichier /etc/init.d/vzgot prise II + +#================================================================================= + +Revision 0.70.0.22 2010/01/02 19:38:33 safe +creation du fichier /etc/init.d/vzgot + +#================================================================================= + +Revision 0.70.0.21 2010/01/02 14:58:18 safe +adjustemen shell prise II + +#================================================================================= + +Revision 0.70.0.20 2010/01/02 14:36:54 safe +creation du fichier VZLIB/vzsir/CONTNAME/status +adjustemen shell + +#================================================================================= + +Revision 0.70.0.19 2010/01/01 22:56:30 safe +correction format vzredoall (ajout d'un delais) + +#================================================================================= + +Revision 0.70.0.18 2010/01/01 22:55:26 safe +correction format vzredoall (ajout d'un delais) + +#================================================================================= + +Revision 0.70.0.17 2010/01/01 22:34:02 safe +correction format vzredoall (fc12 a la place de fc13!) + +#================================================================================= + +Revision 0.70.0.16 2010/01/01 20:44:31 safe +correction format vzredoall + +#================================================================================= + +Revision 0.70.0.15 2010/01/01 20:40:43 safe +mise en place du shell vzgot.redoall prise III + +#================================================================================= + +Revision 0.70.0.14 2010/01/01 20:14:53 safe +mise en place du shell vzgot.redoall prise II + +#================================================================================= + +Revision 0.70.0.13 2010/01/01 18:56:42 safe +mise en place du shell vzgot.redoall + +#================================================================================= + +Revision 0.70.0.12 2010/01/01 18:38:13 safe +prise en compte et affichage des information distribution et architecture + +#================================================================================= + +Revision 0.70.0.11 2010/01/01 16:54:15 safe +addition de etc/snmp/snmpd.conf prise III + +#================================================================================= + +Revision 0.70.0.10 2010/01/01 16:50:52 safe +addition de etc/snmp/snmpd.conf prise II + +#================================================================================= + +Revision 0.70.0.9 2010/01/01 16:47:19 safe +addition de etc/snmp/snmpd.conf + +#================================================================================= + +Revision 0.70.0.8 2010/01/01 15:37:39 safe +addition de etc/sudoers + +#================================================================================= + +Revision 0.70.0.7 2010/01/01 15:27:09 safe +addition de etc/sudoers + +#================================================================================= + +Revision 0.70.0.6 2010/01/01 15:23:03 safe +correction vzgot.fboot.redhat pour addition de users + +#================================================================================= + +Revision 0.70.0.5 2010/01/01 15:15:55 safe +correction vzgot.fboot.redhat + +#================================================================================= + +Revision 0.70.0.4 2010/01/01 15:10:59 safe +meilleur set de protection des fichiers + +#================================================================================= + +Revision 0.70.0.3 2010/01/01 15:08:06 safe +fichier de configuration resolv.conf + +#================================================================================= + +Revision 0.70.0.2 2010/01/01 15:05:33 safe +fichier de configuration shadow + +#================================================================================= + +Revision 0.70.0.1 2010/01/01 13:47:10 safe +meilleur fichier de configuration + +#================================================================================= + +Revision 0.70.0.0 2010/01/01 12:58:32 safe +Ratrapage numero de Version + +Revision 0.70 2010/01/01 12:58:32 safe +upgrade version + +Revision 0.6.0.20 2010/01/01 12:58:32 safe +33 distribution operationnel dans vzgot + +#================================================================================= + +Revision 0.6.0.19 2009/12/31 21:29:48 safe +ajustement de l'addition des RPM extra dans un container prise V + +#================================================================================= + +Revision 0.6.0.18 2009/12/31 21:27:38 safe +ajustement de l'addition des RPM extra dans un container prise IV + +#================================================================================= + +Revision 0.6.0.17 2009/12/31 21:18:34 safe +ajustement de l'addition des RPM extra dans un container prise III + +#================================================================================= + +Revision 0.6.0.16 2009/12/31 21:11:01 safe +ajustement de l'addition des RPM extra dans un container prise II + +#================================================================================= + +Revision 0.6.0.15 2009/12/31 21:00:43 safe +ajustement de l'addition des RPM extra dans un container + +#================================================================================= + +Revision 0.6.0.14 2009/12/31 20:23:55 safe +inclusion rpm iputils dans el4.7-ix86-64 + +#================================================================================= + +Revision 0.6.0.13 2009/12/31 17:45:07 safe +correction personlity pour x86_64 + +#================================================================================= + +Revision 0.6.0.12 2009/12/31 15:10:36 safe +correction vzgot.fboot.redhat, pour l'extraction des numero IP des alias + +#================================================================================= + +Revision 0.6.0.11 2009/12/31 03:12:54 safe +container el4.7 operationel + +#================================================================================= + +Revision 0.6.0.10 2009/12/31 00:43:44 safe +on prend en compte l'architecture Prise VII +definition de la variable LD_ASSUME_KERNEL + +#================================================================================= + +Revision 0.6.0.9 2009/12/31 00:41:23 safe +on prend en compte l'architecture Prise VI +definition de la variable LD_ASSUME_KERNEL + +#================================================================================= + +Revision 0.6.0.8 2009/12/31 00:22:20 safe +on prend en compte l'architecture Prise V + +#================================================================================= + +Revision 0.6.0.7 2009/12/30 19:29:48 safe +on prend en compte l'architecture Prise IV + +#================================================================================= + +Revision 0.6.0.6 2009/12/30 19:27:27 safe +on prend en compte l'architecture Prise III + +#================================================================================= + +Revision 0.6.0.5 2009/12/30 19:27:08 safe +on prend en compte l'architecture + +#================================================================================= + +Revision 0.6.0.4 2009/12/30 19:24:59 safe +on prend en compte l'architecture + +#================================================================================= + +Revision 0.6.0.3 2009/12/30 18:45:46 safe +Mise en place du traietemnt de l'architecture + +#================================================================================= + +Revision 0.6.0.2 2009/12/30 15:20:47 safe +verification problem RPM de rh9 + +#================================================================================= + +Revision 0.6.0.1 2009/12/30 15:18:18 safe +RPM pour rh9 + +#================================================================================= + +Revision 0.6.0.0 2009/12/30 15:04:54 safe +Ratrapage numero de Version + +Revision 0.6 2009/12/30 15:04:54 safe +upgrade version + +Revision 0.5.0.112 2009/12/30 15:04:54 safe +Passage a la versions 0.6 + +#================================================================================= + +Revision 0.5.0.111 2009/12/30 15:04:28 safe +inclusion de procps pour rh8.0 + +#================================================================================= + +Revision 0.5.0.110 2009/12/29 21:00:51 safe +verifications installation Prise II + +#================================================================================= + +Revision 0.5.0.109 2009/12/29 20:57:52 safe +verifications installation + +#================================================================================= + +Revision 0.5.0.108 2009/12/29 20:55:25 safe +debugging de vzgot.fboot.redhat prise XII + +#================================================================================= + +Revision 0.5.0.107 2009/12/29 20:49:15 safe +debugging de vzgot.fboot.redhat prise XI + +#================================================================================= + +Revision 0.5.0.106 2009/12/29 20:42:34 safe +debugging de vzgot.fboot.redhat prise X + +#================================================================================= + +Revision 0.5.0.105 2009/12/29 20:40:57 safe +debugging de vzgot.fboot.redhat prise IX + +#================================================================================= + +Revision 0.5.0.104 2009/12/29 20:37:12 safe +debugging de vzgot.fboot.redhat prise VIII + +#================================================================================= + +Revision 0.5.0.103 2009/12/29 20:31:46 safe +debugging de vzgot.fboot.redhat prise VII + +#================================================================================= + +Revision 0.5.0.102 2009/12/29 20:27:57 safe +debugging de vzgot.fboot.redhat prise VI + +#================================================================================= + +Revision 0.5.0.101 2009/12/29 20:16:14 safe +debugging de vzgot.fboot.redhat prise V + +#================================================================================= + +Revision 0.5.0.100 2009/12/29 20:12:58 safe +debugging de vzgot.fboot.redhat prise IV + +#================================================================================= + +Revision 0.5.0.99 2009/12/29 19:43:25 safe +debugging de vzgot.fboot.redhat prise III + +#================================================================================= + +Revision 0.5.0.98 2009/12/29 19:40:03 safe +debugging de vzgot.fboot.redhat prise II + +#================================================================================= + +Revision 0.5.0.97 2009/12/29 19:37:13 safe +debugging de vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.96 2009/12/29 19:25:53 safe +mise en place du repertoir etc + +#================================================================================= + +Revision 0.5.0.95 2009/12/28 21:33:55 safe +Ajustement du nom des interfaces veth prise VIII +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.94 2009/12/28 21:24:40 safe +Ajustement du nom des interfaces veth prise VII +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.93 2009/12/28 21:06:38 safe +Ajustement du nom des interfaces veth prise VI +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.92 2009/12/28 21:01:26 safe +Ajustement du nom des interfaces veth prise V +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.91 2009/12/28 21:00:28 safe +Ajustement du nom des interfaces veth prise IV +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.90 2009/12/28 20:49:31 safe +Ajustement du nom des interfaces veth prise III +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.89 2009/12/28 20:48:19 safe +Ajustement du nom des interfaces veth prise II +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.88 2009/12/28 20:42:38 safe +Ajustement du nom des interfaces veth +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.87 2009/12/28 20:20:14 safe +Creation du shell vzgot.mksrvz, prise V + +#================================================================================= + +Revision 0.5.0.86 2009/12/28 20:16:00 safe +Creation du shell vzgot.mksrvz, prise IV + +#================================================================================= + +Revision 0.5.0.85 2009/12/28 20:13:23 safe +Creation du shell vzgot.mksrvz, prise III + +#================================================================================= + +Revision 0.5.0.84 2009/12/28 20:08:51 safe +Creation du shell vzgot.mksrvz, prise II + +#================================================================================= + +Revision 0.5.0.83 2009/12/28 20:05:55 safe +Creation du shell vzgot.mksrvz + +#================================================================================= + +Revision 0.5.0.82 2009/12/28 16:01:21 safe +Mise en place la fonction destroy prise III + +#================================================================================= + +Revision 0.5.0.81 2009/12/28 15:59:31 safe +Mise en place la fonction destroy prise II + +#================================================================================= + +Revision 0.5.0.80 2009/12/28 15:55:38 safe +Mise en place la fonction destroy prise I + +#================================================================================= + +Revision 0.5.0.79 2009/12/28 15:36:35 safe +Mise en place la fonction create Prise X (fin) + +#================================================================================= + +Revision 0.5.0.78 2009/12/28 15:35:02 safe +Mise en place la fonction create Prise IX + +#================================================================================= + +Revision 0.5.0.77 2009/12/28 15:33:28 safe +Mise en place la fonction create Prise VIII + +#================================================================================= + +Revision 0.5.0.76 2009/12/28 15:31:56 safe +Mise en place la fonction create Prise VII + +#================================================================================= + +Revision 0.5.0.75 2009/12/28 04:02:07 safe +Mise en place la fonction create Prise VI + +#================================================================================= + +Revision 0.5.0.74 2009/12/28 03:58:31 safe +Mise en place la fonction create Prise V + +#================================================================================= + +Revision 0.5.0.73 2009/12/28 03:56:20 safe +Mise en place la fonction create Prise IV + +#================================================================================= + +Revision 0.5.0.72 2009/12/28 03:27:02 safe +Mise en place la fonction create Prise III + +#================================================================================= + +Revision 0.5.0.71 2009/12/28 03:23:49 safe +Mise en place la fonction create Prise II + +#================================================================================= + +Revision 0.5.0.70 2009/12/28 03:19:34 safe +Mise en place la fonction create + +#================================================================================= + +Revision 0.5.0.69 2009/12/27 03:22:00 safe +on met en place fastboot pour permettre le demarrage Prise II + +#================================================================================= + +Revision 0.5.0.68 2009/12/27 03:19:50 safe +on met en place fastboot pour permettre le demarrage + +#================================================================================= + +Revision 0.5.0.67 2009/12/27 02:49:30 safe +on revient en arriere sur Unsharing data. + +#================================================================================= + +Revision 0.5.0.66 2009/12/27 01:14:03 safe +Unsharing data (to avoid dmesg) Prise II + +#================================================================================= + +Revision 0.5.0.65 2009/12/27 01:12:46 safe +Unsharing data (to avoid dmesg) + +#================================================================================= + +Revision 0.5.0.64 2009/12/27 01:03:49 safe +Permission du privilege CAP_SYS_ADMIN +(permission de faire des mounts) + +#================================================================================= + +Revision 0.5.0.63 2009/12/27 00:50:35 safe +suppresion du privilege CAP_SYS_ADMIN, pour ne plus +avoir access a dmesg? + +#================================================================================= + +Revision 0.5.0.62 2009/12/23 01:07:09 safe +modification de la routine pour elever des privileges. +prctl(PR_CAPBSET_DROP,todrop[i],0,0,0) + +#================================================================================= + +Revision 0.5.0.61 2009/12/23 00:39:46 safe +Le container ne plus metrtre l'horloge system a jours +prctl (PR_CAPBSET_DROP,CAP_SYS_BOOT|CAP_SYS_TIME.....) + +#================================================================================= + +Revision 0.5.0.60 2009/12/20 14:45:33 safe +Correction du shell vzgot.fboot.redhat +ajout des informations dans fstab + +#================================================================================= + +Revision 0.5.0.59 2009/12/20 01:33:10 safe +Correction du shell vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.58 2009/12/20 01:30:48 safe +Correction du shell vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.57 2009/12/20 01:25:31 safe +Creation du shell vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.56 2009/12/20 01:25:14 safe +Creation du shell vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.55 2009/12/19 19:15:24 safe +ajustements VZLIB prise III + +#================================================================================= + +Revision 0.5.0.54 2009/12/19 19:13:21 safe +ajustements VZLIB + +#================================================================================= + +Revision 0.5.0.53 2009/12/19 19:10:41 safe +Correction path viarial config VZLIB + +#================================================================================= + +Revision 0.5.0.52 2009/12/19 19:08:32 safe +Correction path pour fichier locks + +#================================================================================= + +Revision 0.5.0.51 2009/12/19 19:06:47 safe +Correction des shell pour incluse vzdir prise II + +#================================================================================= + +Revision 0.5.0.50 2009/12/19 19:01:21 safe +Correction des shell pour incluse vzdir prise II + +#================================================================================= + +Revision 0.5.0.49 2009/12/19 18:59:14 safe +Correction des shell pour incluse vzdir + +#================================================================================= + +Revision 0.5.0.48 2009/12/19 18:50:34 safe +creation du repertoir /var/lib/vzgot/vzdir + +#================================================================================= + +Revision 0.5.0.47 2009/12/19 18:42:07 safe +deplacement des fichier shell dans /var/lib/vzgot/shell prise IV +on cherche dans /var/lib/vzgot, sans specifier le numero de version + +#================================================================================= + +Revision 0.5.0.46 2009/12/19 18:41:14 safe +deplacement des fichier shell dans /var/lib/vzgot/shell prise III +on cherche dans /var/lib/vzgot, sans specifier le numero de version + +#================================================================================= + +Revision 0.5.0.45 2009/12/19 18:39:44 safe +deplacement des fichier shell dans /var/lib/vzgot/shell prise II? + +#================================================================================= + +Revision 0.5.0.44 2009/12/19 18:36:13 safe +deplacement des fichier shell dans /var/lib/vzgot/shell + +#================================================================================= + +Revision 0.5.0.43 2009/12/19 05:48:05 safe +mise au point de vzgot.fboot prise I + +#================================================================================= + +Revision 0.5.0.42 2009/12/19 00:47:58 safe +Premier essais de vzgot.fboot prise XXIV + +#================================================================================= + +Revision 0.5.0.41 2009/12/19 00:46:28 safe +Premier essais de vzgot.fboot prise XXIII + +#================================================================================= + +Revision 0.5.0.40 2009/12/19 00:45:05 safe +Premier essais de vzgot.fboot prise XXII + +#================================================================================= + +Revision 0.5.0.39 2009/12/19 00:43:36 safe +Premier essais de vzgot.fboot prise XXI + +#================================================================================= + +Revision 0.5.0.38 2009/12/19 00:04:33 safe +Premier essais de vzgot.fboot prise XX + +#================================================================================= + +Revision 0.5.0.37 2009/12/19 00:01:11 safe +Premier essais de vzgot.fboot prise XIX + +#================================================================================= + +Revision 0.5.0.36 2009/12/18 23:58:43 safe +Premier essais de vzgot.fboot prise XVIII + +#================================================================================= + +Revision 0.5.0.35 2009/12/18 23:57:29 safe +Premier essais de vzgot.fboot prise XVII + +#================================================================================= + +Revision 0.5.0.34 2009/12/18 23:56:43 safe +Premier essais de vzgot.fboot prise XVI + +#================================================================================= + +Revision 0.5.0.33 2009/12/18 23:55:27 safe +Premier essais de vzgot.fboot prise XV + +#================================================================================= + +Revision 0.5.0.32 2009/12/18 23:51:57 safe +Premier essais de vzgot.fboot prise XIV + +#================================================================================= + +Revision 0.5.0.31 2009/12/18 23:51:02 safe +Premier essais de vzgot.fboot prise XIII + +#================================================================================= + +Revision 0.5.0.30 2009/12/16 03:56:29 safe +Premier essais de vzgot.fboot prise XII + +#================================================================================= + +Revision 0.5.0.29 2009/12/16 03:54:01 safe +Premier essais de vzgot.fboot prise XI + +#================================================================================= + +Revision 0.5.0.28 2009/12/16 03:39:20 safe +Premier essais de vzgot.fboot prise X + +#================================================================================= + +Revision 0.5.0.27 2009/12/16 03:35:44 safe +Premier essais de vzgot.fboot prise IX + +#================================================================================= + +Revision 0.5.0.26 2009/12/16 03:34:27 safe +Premier essais de vzgot.fboot prise VIII + +#================================================================================= + +Revision 0.5.0.25 2009/12/16 03:32:38 safe +Premier essais de vzgot.fboot prise VII + +#================================================================================= + +Revision 0.5.0.24 2009/12/16 03:29:19 safe +Premier essais de vzgot.fboot prise VI + +#================================================================================= + +Revision 0.5.0.23 2009/12/16 03:26:48 safe +Premier essais de vzgot.fboot prise V + +#================================================================================= + +Revision 0.5.0.22 2009/12/16 03:25:43 safe +Premier essais de vzgot.fboot prise IV + +#================================================================================= + +Revision 0.5.0.21 2009/12/16 03:23:55 safe +Premier essais de vzgot.fboot prise III + +#================================================================================= + +Revision 0.5.0.20 2009/12/16 03:21:27 safe +Premier essais de vzgot.fboot prise II + +#================================================================================= + +Revision 0.5.0.19 2009/12/16 03:16:08 safe +Premier essais de vzgot.fboot + +#================================================================================= + +Revision 0.5.0.18 2009/12/16 02:30:12 safe +insertion du nom de la distribution + +#================================================================================= + +Revision 0.5.0.17 2009/12/16 02:21:09 safe +modification appel a strcpy Prise II + +#================================================================================= + +Revision 0.5.0.16 2009/12/16 02:16:56 safe +modification appel a strcpy + +#================================================================================= + +Revision 0.5.0.15 2009/12/15 05:49:02 safe +creation de la command firstboot prise XIII + +#================================================================================= + +Revision 0.5.0.14 2009/12/15 05:48:06 safe +creation de la command firstboot prise XII + +#================================================================================= + +Revision 0.5.0.13 2009/12/15 05:45:59 safe +creation de la command firstboot prise XI + +#================================================================================= + +Revision 0.5.0.12 2009/12/15 05:42:20 safe +creation de la command firstboot prise X + +#================================================================================= + +Revision 0.5.0.11 2009/12/15 05:40:30 safe +creation de la command firstboot prise IX + +#================================================================================= + +Revision 0.5.0.10 2009/12/15 05:39:32 safe +creation de la command firstboot prise VIII + +#================================================================================= + +Revision 0.5.0.9 2009/12/15 05:38:28 safe +creation de la command firstboot prise VII + +#================================================================================= + +Revision 0.5.0.8 2009/12/15 04:20:50 safe +creation de la command firstboot prise VI + +#================================================================================= + +Revision 0.5.0.7 2009/12/15 04:07:31 safe +creation de la command firstboot prise V + +#================================================================================= + +Revision 0.5.0.6 2009/12/15 04:05:02 safe +creation de la command firstboot prise IV + +#================================================================================= + +Revision 0.5.0.5 2009/12/15 03:26:48 safe +creation de la command firstboot prise III + +#================================================================================= + +Revision 0.5.0.4 2009/12/15 03:24:13 safe +creation de la command firstboot prise III + +#================================================================================= + +Revision 0.5.0.3 2009/12/15 03:20:08 safe +creation de la command firstboot prise III + +#================================================================================= + +Revision 0.5.0.2 2009/12/15 03:09:13 safe +creation de la command firstboot prise II + +#================================================================================= + +Revision 0.5.0.1 2009/12/15 03:01:35 safe +creation de la command firstboot + +#================================================================================= + +Revision 0.5.0.0 2009/12/14 15:07:23 safe +Ratrapage numero de Version + +Revision 0.5 2009/12/14 15:07:23 safe +upgrade version + +Revision 0.4.0.16 2009/12/14 15:07:23 safe +version de vzgot globalement operationnel + +#================================================================================= + +Revision 0.4.0.15 2009/12/14 15:04:51 safe +problem de kill prise IX (Le crash semble lie au kernel) + +#================================================================================= + +Revision 0.4.0.14 2009/12/14 14:55:05 safe +problem de kill prise VIII (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.13 2009/12/14 14:52:56 safe +problem de kill prise VII (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.12 2009/12/14 14:46:13 safe +problem de kill prise VI (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.11 2009/12/14 04:10:38 safe +problem de kill prise V (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.10 2009/12/14 04:04:42 safe +problem de kill prise IV (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.9 2009/12/14 03:56:28 safe +problem de kill prise III (detection de process courant) + +#================================================================================= + +Revision 0.4.0.8 2009/12/14 03:38:30 safe +problem de kill prise II (le numero n'etait pas le bon) + +#================================================================================= + +Revision 0.4.0.7 2009/12/14 03:38:16 safe +problem de kill prise II (le numero n'etait pas le bon) + +#================================================================================= + +Revision 0.4.0.6 2009/12/14 03:26:50 safe +problem de kill + +#================================================================================= + +Revision 0.4.0.5 2009/12/14 03:23:54 safe +divedivedive etait toujours mal place mal place + +#================================================================================= + +Revision 0.4.0.4 2009/12/14 03:18:01 safe +divedivedive etaitt mal place + +#================================================================================= + +Revision 0.4.0.3 2009/12/14 03:08:00 safe +verification fonctionnement vzgot avec /bin/bash prise II + +#================================================================================= + +Revision 0.4.0.2 2009/12/14 03:05:30 safe +verification fonctionnement vzgot avec /bin/bash + +#================================================================================= + +Revision 0.4.0.1 2009/12/14 02:59:28 safe +essais du vz shutdown + +#================================================================================= + +Revision 0.4.0.0 2009/12/13 20:20:32 safe +Ratrapage numero de Version + +Revision 0.4 2009/12/13 20:20:32 safe +upgrade version + +Revision 0.2.0.71 2009/12/13 20:20:32 safe +device close et vzgot boot operationel + +#================================================================================= + +Revision 0.2.0.70 2009/12/13 20:15:50 safe +closing device... prise VI + +#================================================================================= + +Revision 0.2.0.69 2009/12/13 20:13:17 safe +closing device... prise V + +#================================================================================= + +Revision 0.2.0.68 2009/12/13 20:04:57 safe +closing device... prise IV + +#================================================================================= + +Revision 0.2.0.67 2009/12/13 20:00:56 safe +closing device... prise III + +#================================================================================= + +Revision 0.2.0.66 2009/12/13 19:51:29 safe +closing device... + +#================================================================================= + +Revision 0.2.0.65 2009/12/13 19:47:03 safe +eliminer le reboot du host par le container (prctl) + +#================================================================================= + +Revision 0.2.0.64 2009/12/13 05:21:44 safe +eliminer le reboot du host par le container (prctl) + +#================================================================================= + +Revision 0.2.0.63 2009/12/13 04:27:17 safe +Verification gestion des signaux Prise IV + +#================================================================================= + +Revision 0.2.0.62 2009/12/13 04:22:40 safe +Verification gestion des signaux Prise III + +#================================================================================= + +Revision 0.2.0.61 2009/12/13 04:17:44 safe +Verification gestion des signaux Prise II + +#================================================================================= + +Revision 0.2.0.60 2009/12/13 03:48:18 safe +Verification gestion des signaux + +#================================================================================= + +Revision 0.2.0.59 2009/12/13 03:25:40 safe +Interception des signaux SIGQUIT,SIGINT et SIGTERM Prise II + +#================================================================================= + +Revision 0.2.0.58 2009/12/13 01:45:07 safe +Interception des signaux SIGQUIT,SIGINT et SIGTERM + +#================================================================================= + +Revision 0.2.0.57 2009/12/13 01:11:31 safe +Gestion du routage up and down + +#================================================================================= + +Revision 0.2.0.56 2009/12/13 00:48:00 safe +mise en place du routage des numero IP utilise par +le container + +#================================================================================= + +Revision 0.2.0.55 2009/12/12 20:10:18 safe +on revient a la config veth + +#================================================================================= + +Revision 0.2.0.54 2009/12/12 20:08:44 safe +la configuration macvlan ne semble aller nul part + +#================================================================================= + +Revision 0.2.0.53 2009/12/12 11:33:01 safe +test de la configuration avec des interface de type macvlan prise IV + +#================================================================================= + +Revision 0.2.0.52 2009/12/12 11:31:29 safe +test de la configuration avec des interface de type macvlan prise III + +#================================================================================= + +Revision 0.2.0.51 2009/12/12 11:30:41 safe +test de la configuration avec des interface de type macvlan prise II + +#================================================================================= + +Revision 0.2.0.50 2009/12/12 11:28:31 safe +test de la configuration avec des interface de type macvlan + +#================================================================================= + +Revision 0.2.0.49 2009/12/11 22:09:00 safe +mise en route de vzgot.start, declaration de ETHNAME dans la config + +#================================================================================= + +Revision 0.2.0.48 2009/12/11 22:04:34 safe +mise en route de vzgot.start + +#================================================================================= + +Revision 0.2.0.47 2009/12/11 21:24:54 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise VIII + +#================================================================================= + +Revision 0.2.0.46 2009/12/11 21:22:45 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise VII + +#================================================================================= + +Revision 0.2.0.45 2009/12/11 21:20:29 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise VI + +#================================================================================= + +Revision 0.2.0.44 2009/12/11 21:17:23 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise V + +#================================================================================= + +Revision 0.2.0.43 2009/12/11 21:16:05 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise IV + +#================================================================================= + +Revision 0.2.0.42 2009/12/11 21:13:10 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise III + +#================================================================================= + +Revision 0.2.0.41 2009/12/11 21:05:29 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise II + +#================================================================================= + +Revision 0.2.0.40 2009/12/11 20:00:54 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container + +#================================================================================= + +Revision 0.2.0.39 2009/12/11 19:30:49 safe +test delay de wakup du VZ container + +#================================================================================= + +Revision 0.2.0.38 2009/12/11 03:43:19 safe +essais du pipe pour vzgot.init, prise VI + +#================================================================================= + +Revision 0.2.0.37 2009/12/11 03:34:29 safe +essais du pipe pour vzgot.init, prise V + +#================================================================================= + +Revision 0.2.0.36 2009/12/11 03:30:13 safe +essais du pipe pour vzgot.init, prise IV + +#================================================================================= + +Revision 0.2.0.35 2009/12/11 03:28:38 safe +essais du pipe pour vzgot.init, prise III + +#================================================================================= + +Revision 0.2.0.34 2009/12/11 03:26:13 safe +essais du pipe pour vzgot.init, prise II + +#================================================================================= + +Revision 0.2.0.33 2009/12/11 03:20:02 safe +premier essais du pipe pou vzgot.init + +#================================================================================= + +Revision 0.2.0.32 2009/12/10 20:11:47 safe +premier essait du fichier vzgot.init prise IV (test valeur de retour) + +#================================================================================= + +Revision 0.2.0.31 2009/12/10 20:07:17 safe +premier essait du fichier vzgot.init prise III (test valeur de retour) + +#================================================================================= + +Revision 0.2.0.30 2009/12/10 19:57:55 safe +premier essait du fichier vzgot.init prise II + +#================================================================================= + +Revision 0.2.0.29 2009/12/10 19:54:54 safe +premier essait du fichier vzgot.init + +#================================================================================= + +Revision 0.2.0.28 2009/12/10 19:49:27 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XV + +#================================================================================= + +Revision 0.2.0.27 2009/12/10 19:48:43 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XIV + +#================================================================================= + +Revision 0.2.0.26 2009/12/10 19:47:35 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XIII + +#================================================================================= + +Revision 0.2.0.25 2009/12/10 19:46:59 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XII + +#================================================================================= + +Revision 0.2.0.24 2009/12/10 19:44:55 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XI + +#================================================================================= + +Revision 0.2.0.23 2009/12/10 19:44:22 safe +verification update fichier config /etc/vzgoot/vzgot_config prise X + +#================================================================================= + +Revision 0.2.0.22 2009/12/10 19:43:41 safe +verification update fichier config /etc/vzgoot/vzgot_config prise IX + +#================================================================================= + +Revision 0.2.0.21 2009/12/10 19:42:37 safe +verification update fichier config /etc/vzgoot/vzgot_config prise VIII + +#================================================================================= + +Revision 0.2.0.20 2009/12/10 19:42:03 safe +verification update fichier config /etc/vzgoot/vzgot_config prise VII + +#================================================================================= + +Revision 0.2.0.19 2009/12/10 19:41:13 safe +verification update fichier config /etc/vzgoot/vzgot_config prise VI + +#================================================================================= + +Revision 0.2.0.18 2009/12/10 19:38:48 safe +verification update fichier config /etc/vzgoot/vzgot_config prise V + +#================================================================================= + +Revision 0.2.0.17 2009/12/10 19:37:26 safe +verification update fichier config /etc/vzgoot/vzgot_config prise IV + +#================================================================================= + +Revision 0.2.0.16 2009/12/10 19:36:24 safe +verification update fichier config /etc/vzgoot/vzgot_config prise III + +#================================================================================= + +Revision 0.2.0.15 2009/12/10 19:35:46 safe +verification update fichier config /etc/vzgoot/vzgot_config prise II + +#================================================================================= + +Revision 0.2.0.14 2009/12/10 19:33:52 safe +verification update fichier config /etc/vzgoot/vzgot_config + +#================================================================================= + +Revision 0.2.0.13 2009/12/10 19:32:34 safe +verification mod de vzgot.init + +#================================================================================= + +Revision 0.2.0.12 2009/12/10 19:31:02 safe +mise en place de vzgot_config + +#================================================================================= + +Revision 0.2.0.11 2009/12/10 03:51:34 safe +verification update + +#================================================================================= + +Revision 0.2.0.10 2009/12/10 03:37:42 safe +mise en place du repertoire shell + +#================================================================================= + +Revision 0.2.0.9 2009/12/08 22:45:02 safe +exploration de la mise en place reseau + +#================================================================================= + +Revision 0.2.0.8 2009/12/08 22:09:57 safe +Initialisation de /etc/mtab dans le container + +#================================================================================= + +Revision 0.2.0.7 2009/12/08 21:52:26 safe +mise en place du fichier PID. + +#================================================================================= + +Revision 0.2.0.6 2009/12/08 16:39:58 safe +test detachement direct prise V + +#================================================================================= + +Revision 0.2.0.5 2009/12/08 16:37:08 safe +test detachement direct prise IV + +#================================================================================= + +Revision 0.2.0.4 2009/12/08 16:32:55 safe +test detachement direct prise III + +#================================================================================= + +Revision 0.2.0.3 2009/12/08 16:31:08 safe +test detachement direct II + +#================================================================================= + +Revision 0.2.0.2 2009/12/08 16:28:37 safe +test detachement direct + +#================================================================================= + +Revision 0.2.0.1 2009/12/08 15:25:27 safe +test du kill du master (/sbin/init) + +#================================================================================= + +Revision 0.2.0.0 2009/12/08 05:08:35 safe +Ratrapage numero de Version + +Revision 0.2 2009/12/08 05:08:35 safe +upgrade version + +Revision 0.1.0.24 2009/12/08 05:08:35 safe +Upgrade des numeros de versions RCS + +#================================================================================= + +Revision 0.1.0.23 2009/12/08 04:28:50 safe +Upgrade des numero de versions RCS + +#================================================================================= + +Revision 0.1.0.22 2009/12/08 04:28:25 safe +Upgrade des numero de versions RCS + +Revision 0.1.0.21 2009/12/08 04:25:42 safe +Upgrade des numero de versions RCS + +#================================================================================= + +Revision 0.1.0.20 2009/12/08 04:20:53 safe +pivot_root operationnel, +fonctionne avec /bin/bash + +#================================================================================= + +Revision 0.1.0.19 2009/12/08 04:20:28 safe +pivot_root operationnel, +fonctionne avec /bin/bash + +#================================================================================= + +Revision 0.1.0.18 2009/12/08 04:19:30 safe +pivot_root operationnel, +fonctionne avec /bin/bash + +#================================================================================= + +Revision 0.1.0.17 2009/12/08 04:14:53 safe +test du pivot_root prise V (test OK?) + +#================================================================================= + +Revision 0.1.0.16 2009/12/08 04:10:59 safe +test du pivot_root prise IV + +#================================================================================= + +Revision 0.1.0.15 2009/12/08 04:09:00 safe +test du pivot_root prise III + +#================================================================================= + +Revision 0.1.0.14 2009/12/08 03:49:48 safe +test du pivot_root prise II + +#================================================================================= + +Revision 0.1.0.13 2009/12/08 03:47:44 safe +test du pivot_root prise I + +#================================================================================= + +Revision 0.1.0.12 2009/12/08 03:42:48 safe +le pivot_root est executable + +#================================================================================= + +Revision 0.1.0.11 2009/12/07 21:55:59 safe +test de vzboot sur delson prise IV +option + dans getopt + +#================================================================================= + +Revision 0.1.0.10 2009/12/07 21:46:18 safe +test de vzboot sur delson prise III + +#================================================================================= + +Revision 0.1.0.9 2009/12/07 21:44:42 safe +test de vzboot sur delson prise II + +#================================================================================= + +Revision 0.1.0.8 2009/12/07 21:41:51 safe +test de vzboot sur delson + +#================================================================================= + +Revision 0.1.0.7 2009/12/07 18:31:58 safe +definition du programme 'generic' vzgot qui +va faire les actions: boot,shutdown,freeze,warmup + +#================================================================================= + +Revision 0.1.0.6 2009/12/07 06:06:05 safe +capacite faire un lock du container + +#================================================================================= + +Revision 0.1.0.5 2009/12/07 03:49:10 safe +capacite de RPM, test deployement du rpm sur delson + +#================================================================================= + +Revision 0.1.0.4 2009/12/07 03:46:29 safe +capacite de RPM, test d'ebauche sur delson + +#================================================================================= + +Revision 0.1.0.3 2009/12/07 02:15:20 safe +inclusion de vzboot.c dans les RCS + +#================================================================================= + +Revision 0.1.0.2 2009/12/07 02:14:00 safe +ebauche du programme vzboot + +Revision 0.1.0.1 2009/12/07 02:14:00 safe +Ratrapage numero de Version + +Revision 0.1 2009/12/07 02:14:00 safe +Creation +#================================================================================= +@ + + +0.84 +log +@upgrade version +@ +text +@#Log des mises a jour RCS +#--------------------------------------------------------------------------------- +#Ce fichier est pour tracer les changements fait dans le developpement +#de MentorX +$Log: Changes,v $ +Revision 0.83.0.1 2010/03/06 16:39:08 jmp +Mise en place su GIT + +Revision 0.83.0.0 2010/03/06 16:39:08 jmp +Ratrapage numero de Version + +Revision 0.83 2010/03/06 16:39:08 jmp +Creation +#================================================================================= + +Revision 0.84.0.0 2010/03/06 16:38:31 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:38:31 jmp +upgrade version + +Revision 0.83.0.1 2010/03/06 16:38:31 jmp +Mise en place su GIT + +Revision 0.83.0.0 2010/03/06 16:38:31 jmp +Ratrapage numero de Version + +Revision 0.83 2010/03/06 16:38:31 jmp +Creation +#================================================================================= + +Revision 0.84.0.0 2010/03/06 16:36:51 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:36:51 jmp +upgrade version + +Revision 0.83.0.2 2010/03/06 16:36:51 jmp +Mise en place su GIT + +Revision 0.83.0.1 2010/03/06 16:36:51 jmp +Ratrapage numero de Version + +Revision 0.83 2010/03/06 16:36:51 jmp +Creation +#================================================================================= + +Revision 0.84.0.1 2010/03/06 16:36:32 jmp +Mise en place su GIT + +Revision 0.84.0.0 2010/03/06 16:36:32 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:36:32 jmp +Creation +#================================================================================= + +Revision 0.84.0.0 2010/03/06 16:36:03 jmp +Ratrapage numero de Version + +Revision 0.84 2010/03/06 16:36:03 jmp +upgrade version + +Revision 0.83.0.8 2010/03/06 16:36:03 jmp +Mise en place su GIT + +Revision 0.83.0.7 2010/03/06 16:36:03 jmp +Ratrapage numero de Version + +Revision 0.83 2010/03/06 16:36:03 jmp +Creation +#================================================================================= + +Revision 0.83.0.7 2010/02/18 14:28:22 safe +Suppression de la definition de CLONE_SYSLOG + +#================================================================================= + +Revision 0.83.0.6 2010/02/15 21:03:45 safe +itest de fonctionnement de syslog sans CLONE_SYSLOG + +#================================================================================= + +Revision 0.83.0.5 2010/02/15 21:02:28 safe +itest de fonctionnement de syslog sans CLONE_SYSLOG + +#================================================================================= + +Revision 0.83.0.4 2010/02/15 17:13:54 safe +creation d'un clone avec CLONE_SYSLOG + +#================================================================================= + +Revision 0.83.0.3 2010/02/10 02:50:09 safe +creation d'un clone avec CLONE_NEWUSER + +#================================================================================= + +Revision 0.83.0.2 2010/02/01 18:44:35 safe +Modification de la copie des clefs dans fboot.{redhat,debian} +prise II + +#================================================================================= + +Revision 0.83.0.1 2010/02/01 18:32:54 safe +Modification de la copie des clefs dans fboot.{redhat,debian} + +#================================================================================= + +Revision 0.83.0.0 2010/01/12 15:36:45 safe +Ratrapage numero de Version + +Revision 0.83 2010/01/12 15:36:45 safe +upgrade version + +Revision 0.82.0.27 2010/01/12 15:36:45 safe +release + +#================================================================================= + +Revision 0.82.0.26 2010/01/12 15:25:05 safe +Correction dans champ i386 manquant dans vxgot_list (rhel4) + +#================================================================================= + +Revision 0.82.0.25 2010/01/12 13:54:15 safe +Correction dans champ i386 manquant dans vxgot_list + +#================================================================================= + +Revision 0.82.0.24 2010/01/12 05:24:32 safe +Correction dans vzgot.mksrvz, variable CPUARCH + +#================================================================================= + +Revision 0.82.0.23 2010/01/12 05:03:13 safe +ajustement useradd dans fboot.redhat prise IV + +#================================================================================= + +Revision 0.82.0.22 2010/01/12 05:00:21 safe +ajustement useradd dans fboot.redhat prise III + +#================================================================================= + +Revision 0.82.0.21 2010/01/12 04:57:53 safe +ajustement useradd dans fboot.redhat prise II + +#================================================================================= + +Revision 0.82.0.20 2010/01/12 04:53:56 safe +ajustement useradd dans fboot.redhat + +#================================================================================= + +Revision 0.82.0.19 2010/01/12 04:42:44 safe +modification fichier groups + +#================================================================================= + +Revision 0.82.0.18 2010/01/12 04:22:46 safe +extension du fichier vzgost_list +modification du script vzgot.redoall + +#================================================================================= + +Revision 0.82.0.17 2010/01/12 04:03:38 safe +inclusion du repertoire /var/lib/vzgot/etc/ssh + +#================================================================================= + +Revision 0.82.0.16 2010/01/11 21:06:32 safe +Test d'installation a partir de zero +gestion de udev pour les versions de type redhat prise III + +#================================================================================= + +Revision 0.82.0.15 2010/01/11 21:04:25 safe +Test d'installation a partir de zero +gestion de udev pour les versions de type redhat prise II + +#================================================================================= + +Revision 0.82.0.14 2010/01/11 21:01:58 safe +Test d'installation a partir de zero +gestion de udev pour les versions de type redhat + +#================================================================================= + +Revision 0.82.0.13 2010/01/11 20:49:55 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise IX + +#================================================================================= + +Revision 0.82.0.12 2010/01/11 20:47:00 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise VIII + +#================================================================================= + +Revision 0.82.0.11 2010/01/11 20:42:46 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise VII + +#================================================================================= + +Revision 0.82.0.10 2010/01/11 20:39:50 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise VI + +#================================================================================= + +Revision 0.82.0.9 2010/01/11 20:28:49 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise V + +#================================================================================= + +Revision 0.82.0.8 2010/01/11 20:26:32 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prise IV + +#================================================================================= + +Revision 0.82.0.7 2010/01/11 20:19:25 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prose III + +#================================================================================= + +Revision 0.82.0.6 2010/01/11 20:15:35 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) prose II + +#================================================================================= + +Revision 0.82.0.5 2010/01/11 20:13:47 safe +Test d'installation a partir de zero +ajustement shell script vzgot.create (retour d'erreur) + +#================================================================================= + +Revision 0.82.0.4 2010/01/11 20:08:15 safe +Test d'installation a partir de zero +ajustement shell script vzgot.mksrvz + +#================================================================================= + +Revision 0.82.0.3 2010/01/11 20:04:49 safe +Test d'installation a partir de zero +configuration de etc/shadow et etc/resolv.conf +a partir des informations du host. + +#================================================================================= + +Revision 0.82.0.2 2010/01/11 16:49:38 safe +Test d'installation a partir de zero +changement de vzgot.mxsrvz + +#================================================================================= + +Revision 0.82.0.1 2010/01/11 16:05:57 safe +Test d'installation a partir de zero +introduction de vzgot_list + +#================================================================================= + +Revision 0.82.0.0 2010/01/10 03:28:28 safe +Ratrapage numero de Version + +Revision 0.82 2010/01/10 03:28:28 safe +upgrade version + +Revision 0.81.0.12 2010/01/10 03:28:28 safe +Test d'installation a partir de zero + +#================================================================================= + +Revision 0.81.0.11 2010/01/09 15:38:30 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise XXI + +#================================================================================= + +Revision 0.81.0.10 2010/01/09 15:34:44 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise XX + +#================================================================================= + +Revision 0.81.0.9 2010/01/09 15:31:42 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise XIX + +#================================================================================= + +Revision 0.81.0.8 2010/01/09 14:57:24 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise VIII + +#================================================================================= + +Revision 0.81.0.7 2010/01/09 14:49:02 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise VII + +#================================================================================= + +Revision 0.81.0.6 2010/01/09 03:47:32 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise VI + +#================================================================================= + +Revision 0.81.0.5 2010/01/09 03:46:11 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise V + +#================================================================================= + +Revision 0.81.0.4 2010/01/09 03:41:05 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise IV + +#================================================================================= + +Revision 0.81.0.3 2010/01/09 03:30:32 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise III + +#================================================================================= + +Revision 0.81.0.2 2010/01/09 03:25:29 safe +utilisation des partitions LVM +ajustement des shell destroy et create prise II + +#================================================================================= + +Revision 0.81.0.1 2010/01/09 03:20:34 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.81.0.0 2010/01/09 03:20:15 safe +Ratrapage numero de Version + +Revision 0.81 2010/01/09 03:20:15 safe +upgrade version + +Revision 0.79.0.1 2010/01/09 03:20:15 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.79.0.0 2010/01/09 03:16:25 safe +Ratrapage numero de Version + +Revision 0.79 2010/01/09 03:16:25 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.78 2010/01/09 03:16:06 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.77.0.1 2010/01/09 03:15:48 safe +utilisation des partitions LVM +ajustement des shell destroy et create + +#================================================================================= + +Revision 0.77.0.0 2010/01/08 18:37:09 safe +Ratrapage numero de Version + +Revision 0.77 2010/01/08 18:37:09 safe +upgrade version + +Revision 0.75.0.16 2010/01/08 18:37:09 safe +utilisation des partitions LVM + +#================================================================================= + +Revision 0.75.0.15 2010/01/08 04:44:44 safe +Probleme avec Debian ubu8.4, Prise V +problem useradd + +#================================================================================= + +Revision 0.75.0.14 2010/01/08 03:44:53 safe +Probleme avec Debian ubu8.4, Prise IV +changement de la routine de useradd pour ne pas cree +le home directory directement + +#================================================================================= + +Revision 0.75.0.13 2010/01/08 03:39:10 safe +Probleme avec Debian ubu8.4, Prise III +changement de la routine de useradd pour ne pas cree +le home directory directement + +#================================================================================= + +Revision 0.75.0.12 2010/01/08 03:35:54 safe +Probleme avec Debian ubu8.4, Prise II +changement de la routine de useradd pour ne pas cree +le home directory directement + +#================================================================================= + +Revision 0.75.0.11 2010/01/08 03:26:36 safe +Probleme avec Debian ubu8.4, +changement de la routine de useradd pour ne pas cree +le home directory directement + +#================================================================================= + +Revision 0.75.0.10 2010/01/07 20:31:44 safe +insertion de ubu9.4 comme apartenant a Debian +creation du repertoir /var/run/networking +modification devices.allow pour permerttre les devices PTS Prise II + +#================================================================================= + +Revision 0.75.0.9 2010/01/07 20:25:30 safe +insertion de ubu9.4 comme apartenant a Debian +creation du repertoir /var/run/networking +modification devices.allow pour permerttre les devices PTS + +#================================================================================= + +Revision 0.75.0.8 2010/01/07 20:05:55 safe +insertion de ubu9.4 comme apartenant a Debian + +#================================================================================= + +Revision 0.75.0.7 2010/01/07 18:56:34 safe +cgroup operationel, mise en place de iptables + +#================================================================================= + +Revision 0.75.0.6 2010/01/07 05:15:18 safe +Creation du repertoir cgroup.d et gestion Prise IV + +#================================================================================= + +Revision 0.75.0.5 2010/01/07 04:58:32 safe +Creation du repertoir cgroup.d et gestion Prise III + +#================================================================================= + +Revision 0.75.0.4 2010/01/06 21:05:28 safe +Creation du repertoir cgroup.d et gestion Prise II + +#================================================================================= + +Revision 0.75.0.3 2010/01/06 20:43:25 safe +Creation du repertoir cgroup.d et gestion + +#================================================================================= + +Revision 0.75.0.2 2010/01/06 03:11:33 safe +Creation du repertoire vztemplate + +#================================================================================= + +Revision 0.75.0.1 2010/01/06 02:52:01 safe +Mise en place de cgroup Prise II + +#================================================================================= + +Revision 0.75.0.0 2010/01/06 02:38:45 safe +Ratrapage numero de Version + +Revision 0.75 2010/01/06 02:38:45 safe +upgrade version + +Revision 0.71.0.19 2010/01/06 02:38:45 safe +Mise en place de cgroup + +#================================================================================= + +Revision 0.71.0.18 2010/01/05 05:25:39 safe +Container de type ubuntu Prise XXI (ajustement shell debian) + +#================================================================================= + +Revision 0.71.0.17 2010/01/05 05:19:55 safe +Container de type ubuntu Prise XX (ajustement shell debian) + +#================================================================================= + +Revision 0.71.0.16 2010/01/05 05:02:49 safe +Container de type ubuntu Prise XIX (ajustement shell debian) + +#================================================================================= + +Revision 0.71.0.15 2010/01/05 04:32:35 safe +Container de type ubuntu Prise VIII (ajustement shell debian) + +#================================================================================= + +Revision 0.71.0.14 2010/01/05 04:27:22 safe +Container de type ubuntu Prise VII (removing udev auto start) + +Mise en route Debian (Ubuntu) +- Template lxc-ubuntu-8.04-i386.tar.gz (stephane graber lxc) + le rootfs est mal positionner +- le fichier network est dans /etc/network/interface (a construire) +- removing udev family auto start + +#================================================================================= + +Revision 0.71.0.13 2010/01/05 01:18:58 safe +Container de type ubuntu Prise VI (correction setting reseau) + +#================================================================================= + +Revision 0.71.0.12 2010/01/04 23:27:58 safe +Container de type ubuntu Prise V (correction setting reseau) + +#================================================================================= + +Revision 0.71.0.11 2010/01/04 23:24:54 safe +Container de type ubuntu Prise IV (correction setting reseau) + +#================================================================================= + +Revision 0.71.0.10 2010/01/04 20:24:28 safe +Container de type ubuntu Prise III (corrction setting reseau) + +#================================================================================= + +Revision 0.71.0.9 2010/01/04 20:10:34 safe +Container de type unbutu Prise II (c'est un debian!) + +#================================================================================= + +Revision 0.71.0.8 2010/01/04 19:46:55 safe +Container de type unbutu Prise I + +#================================================================================= + +Revision 0.71.0.7 2010/01/04 18:53:15 safe +Ajustement spec file chkconfig + +#================================================================================= + +Revision 0.71.0.6 2010/01/04 16:11:34 safe +Inclusion de Change et affichage des resultats +de pipe en mode no debug + +#================================================================================= + +Revision 0.71.0.5 2010/01/04 16:07:38 safe +Inclusion de Change et affichage des resultats +de pipe en mode no debug + +#================================================================================= + +Revision 0.71.0.4 2010/01/04 15:45:34 safe +Inclusion de Change et affichage des resultats +de pipe en mode no debug + +#================================================================================= + +Revision 0.71.0.3 2010/01/04 02:13:12 safe +README Operationnel + +#================================================================================= + +Revision 0.71.0.2 2010/01/04 01:23:05 safe +ajout du README Prise II + +#================================================================================= + +Revision 0.71.0.1 2010/01/04 01:18:11 safe +ajout du README + +#================================================================================= + +Revision 0.71.0.0 2010/01/03 23:29:18 safe +Ratrapage numero de Version + +Revision 0.71 2010/01/03 23:29:18 safe +upgrade version + +Revision 0.70.0.85 2010/01/03 23:29:18 safe +service vzgot start est operationnel + +#================================================================================= + +Revision 0.70.0.84 2010/01/03 22:24:19 safe +mise en place d'une console prise XXVII + +#================================================================================= + +Revision 0.70.0.83 2010/01/03 22:13:15 safe +mise en place d'une console prise XXVI + +#================================================================================= + +Revision 0.70.0.82 2010/01/03 22:07:54 safe +mise en place d'une console prise XXV + +#================================================================================= + +Revision 0.70.0.81 2010/01/03 22:04:37 safe +mise en place d'une console prise XXIV + +#================================================================================= + +Revision 0.70.0.80 2010/01/03 21:58:41 safe +mise en place d'une console prise XXIII + +#================================================================================= + +Revision 0.70.0.79 2010/01/03 21:46:32 safe +mise en place d'une console prise XXII + +#================================================================================= + +Revision 0.70.0.78 2010/01/03 21:41:28 safe +mise en place d'une console prise XXI + +#================================================================================= + +Revision 0.70.0.77 2010/01/03 21:26:54 safe +mise en place d'une console prise XX + +#================================================================================= + +Revision 0.70.0.76 2010/01/03 21:24:07 safe +mise en place d'une console prise XIX + +#================================================================================= + +Revision 0.70.0.75 2010/01/03 21:22:55 safe +mise en place d'une console prise XVIII + +#================================================================================= + +Revision 0.70.0.74 2010/01/03 21:20:18 safe +mise en place d'une console prise XVII + +#================================================================================= + +Revision 0.70.0.73 2010/01/03 21:16:08 safe +mise en place d'une console prise XVI + +#================================================================================= + +Revision 0.70.0.72 2010/01/03 21:14:20 safe +mise en place d'une console prise XV + +#================================================================================= + +Revision 0.70.0.71 2010/01/03 21:11:26 safe +mise en place d'une console prise XIV + +#================================================================================= + +Revision 0.70.0.70 2010/01/03 19:48:04 safe +mise en place d'une console prise XIII + +#================================================================================= + +Revision 0.70.0.69 2010/01/03 19:45:36 safe +mise en place d'une console prise XII + +#================================================================================= + +Revision 0.70.0.68 2010/01/03 19:30:24 safe +mise en place d'une console prise XI + +#================================================================================= + +Revision 0.70.0.67 2010/01/03 19:27:53 safe +mise en place d'une console prise X + +#================================================================================= + +Revision 0.70.0.66 2010/01/03 18:18:31 safe +mise en place d'une console prise IX + +#================================================================================= + +Revision 0.70.0.65 2010/01/03 18:10:15 safe +mise en place d'une console prise VIII + +#================================================================================= + +Revision 0.70.0.64 2010/01/03 18:07:47 safe +mise en place d'une console prise VII + +#================================================================================= + +Revision 0.70.0.63 2010/01/03 18:06:06 safe +mise en place d'une console prise VI + +#================================================================================= + +Revision 0.70.0.62 2010/01/03 18:04:44 safe +mise en place d'une console prise V + +#================================================================================= + +Revision 0.70.0.61 2010/01/03 18:01:26 safe +mise en place d'une console prise IV + +#================================================================================= + +Revision 0.70.0.60 2010/01/03 17:59:22 safe +mise en place d'une console prise III + +#================================================================================= + +Revision 0.70.0.59 2010/01/03 17:57:44 safe +mise en place d'une console prise II + +#================================================================================= + +Revision 0.70.0.58 2010/01/03 17:53:48 safe +mise en place d'une console prise I + +#================================================================================= + +Revision 0.70.0.57 2010/01/03 06:29:35 safe +traitement problem de message au demarrage boot systeme Prise IX + +#================================================================================= + +Revision 0.70.0.56 2010/01/03 06:27:02 safe +traitement problem de message au demarrage boot systeme Prise VIII + +#================================================================================= + +Revision 0.70.0.55 2010/01/03 06:22:27 safe +traitement problem de message au demarrage boot systeme Prise VII + +#================================================================================= + +Revision 0.70.0.54 2010/01/03 06:20:50 safe +traitement problem de message au demarrage boot systeme Prise VI + +#================================================================================= + +Revision 0.70.0.53 2010/01/03 06:17:25 safe +traitement problem de message au demarrage boot systeme Prise V + +#================================================================================= + +Revision 0.70.0.52 2010/01/03 06:13:23 safe +traitement problem de message au demarrage boot systeme Prise IV + +#================================================================================= + +Revision 0.70.0.51 2010/01/03 06:11:29 safe +traitement problem de message au demarrage boot systeme Prise III + +#================================================================================= + +Revision 0.70.0.50 2010/01/03 06:06:49 safe +traitement problem de message au demarrage boot systeme Prise II + +#================================================================================= + +Revision 0.70.0.49 2010/01/03 05:53:08 safe +traitement problem de message au demarrage boot systeme Prise I + +#================================================================================= + +Revision 0.70.0.48 2010/01/03 04:50:29 safe +traitement problem de message au demarrage boot systeme + +#================================================================================= + +Revision 0.70.0.47 2010/01/03 01:30:05 safe +creation du fichier /etc/init.d/vzgot prise XXVI + +#================================================================================= + +Revision 0.70.0.46 2010/01/03 01:28:52 safe +creation du fichier /etc/init.d/vzgot prise XXV + +#================================================================================= + +Revision 0.70.0.45 2010/01/03 01:25:37 safe +creation du fichier /etc/init.d/vzgot prise XXIV + +#================================================================================= + +Revision 0.70.0.44 2010/01/03 01:23:25 safe +creation du fichier /etc/init.d/vzgot prise XXIII + +#================================================================================= + +Revision 0.70.0.43 2010/01/03 01:17:40 safe +creation du fichier /etc/init.d/vzgot prise XXII + +#================================================================================= + +Revision 0.70.0.42 2010/01/02 21:18:57 safe +creation du fichier /etc/init.d/vzgot prise XXI + +#================================================================================= + +Revision 0.70.0.41 2010/01/02 21:16:38 safe +creation du fichier /etc/init.d/vzgot prise XX + +#================================================================================= + +Revision 0.70.0.40 2010/01/02 20:57:02 safe +creation du fichier /etc/init.d/vzgot prise XIX + +#================================================================================= + +Revision 0.70.0.39 2010/01/02 20:28:55 safe +creation du fichier /etc/init.d/vzgot prise XVIII + +#================================================================================= + +Revision 0.70.0.38 2010/01/02 20:28:18 safe +creation du fichier /etc/init.d/vzgot prise XVII + +#================================================================================= + +Revision 0.70.0.37 2010/01/02 20:26:56 safe +creation du fichier /etc/init.d/vzgot prise XVI + +#================================================================================= + +Revision 0.70.0.36 2010/01/02 20:23:55 safe +creation du fichier /etc/init.d/vzgot prise XV + +#================================================================================= + +Revision 0.70.0.35 2010/01/02 20:21:19 safe +creation du fichier /etc/init.d/vzgot prise XIV + +#================================================================================= + +Revision 0.70.0.34 2010/01/02 20:20:09 safe +creation du fichier /etc/init.d/vzgot prise XIII + +#================================================================================= + +Revision 0.70.0.33 2010/01/02 20:16:04 safe +creation du fichier /etc/init.d/vzgot prise XII + +#================================================================================= + +Revision 0.70.0.32 2010/01/02 20:11:37 safe +creation du fichier /etc/init.d/vzgot prise XI + +#================================================================================= + +Revision 0.70.0.31 2010/01/02 20:10:25 safe +creation du fichier /etc/init.d/vzgot prise X + +#================================================================================= + +Revision 0.70.0.30 2010/01/02 20:09:17 safe +creation du fichier /etc/init.d/vzgot prise IX + +#================================================================================= + +Revision 0.70.0.29 2010/01/02 20:03:58 safe +creation du fichier /etc/init.d/vzgot prise VIII + +#================================================================================= + +Revision 0.70.0.28 2010/01/02 20:00:40 safe +creation du fichier /etc/init.d/vzgot prise VII + +#================================================================================= + +Revision 0.70.0.27 2010/01/02 19:59:14 safe +creation du fichier /etc/init.d/vzgot prise VI + +#================================================================================= + +Revision 0.70.0.26 2010/01/02 19:58:16 safe +creation du fichier /etc/init.d/vzgot prise V + +#================================================================================= + +Revision 0.70.0.25 2010/01/02 19:49:31 safe +creation du fichier /etc/init.d/vzgot prise IV + +#================================================================================= + +Revision 0.70.0.24 2010/01/02 19:48:51 safe +creation du fichier /etc/init.d/vzgot prise III + +#================================================================================= + +Revision 0.70.0.23 2010/01/02 19:48:01 safe +creation du fichier /etc/init.d/vzgot prise II + +#================================================================================= + +Revision 0.70.0.22 2010/01/02 19:38:33 safe +creation du fichier /etc/init.d/vzgot + +#================================================================================= + +Revision 0.70.0.21 2010/01/02 14:58:18 safe +adjustemen shell prise II + +#================================================================================= + +Revision 0.70.0.20 2010/01/02 14:36:54 safe +creation du fichier VZLIB/vzsir/CONTNAME/status +adjustemen shell + +#================================================================================= + +Revision 0.70.0.19 2010/01/01 22:56:30 safe +correction format vzredoall (ajout d'un delais) + +#================================================================================= + +Revision 0.70.0.18 2010/01/01 22:55:26 safe +correction format vzredoall (ajout d'un delais) + +#================================================================================= + +Revision 0.70.0.17 2010/01/01 22:34:02 safe +correction format vzredoall (fc12 a la place de fc13!) + +#================================================================================= + +Revision 0.70.0.16 2010/01/01 20:44:31 safe +correction format vzredoall + +#================================================================================= + +Revision 0.70.0.15 2010/01/01 20:40:43 safe +mise en place du shell vzgot.redoall prise III + +#================================================================================= + +Revision 0.70.0.14 2010/01/01 20:14:53 safe +mise en place du shell vzgot.redoall prise II + +#================================================================================= + +Revision 0.70.0.13 2010/01/01 18:56:42 safe +mise en place du shell vzgot.redoall + +#================================================================================= + +Revision 0.70.0.12 2010/01/01 18:38:13 safe +prise en compte et affichage des information distribution et architecture + +#================================================================================= + +Revision 0.70.0.11 2010/01/01 16:54:15 safe +addition de etc/snmp/snmpd.conf prise III + +#================================================================================= + +Revision 0.70.0.10 2010/01/01 16:50:52 safe +addition de etc/snmp/snmpd.conf prise II + +#================================================================================= + +Revision 0.70.0.9 2010/01/01 16:47:19 safe +addition de etc/snmp/snmpd.conf + +#================================================================================= + +Revision 0.70.0.8 2010/01/01 15:37:39 safe +addition de etc/sudoers + +#================================================================================= + +Revision 0.70.0.7 2010/01/01 15:27:09 safe +addition de etc/sudoers + +#================================================================================= + +Revision 0.70.0.6 2010/01/01 15:23:03 safe +correction vzgot.fboot.redhat pour addition de users + +#================================================================================= + +Revision 0.70.0.5 2010/01/01 15:15:55 safe +correction vzgot.fboot.redhat + +#================================================================================= + +Revision 0.70.0.4 2010/01/01 15:10:59 safe +meilleur set de protection des fichiers + +#================================================================================= + +Revision 0.70.0.3 2010/01/01 15:08:06 safe +fichier de configuration resolv.conf + +#================================================================================= + +Revision 0.70.0.2 2010/01/01 15:05:33 safe +fichier de configuration shadow + +#================================================================================= + +Revision 0.70.0.1 2010/01/01 13:47:10 safe +meilleur fichier de configuration + +#================================================================================= + +Revision 0.70.0.0 2010/01/01 12:58:32 safe +Ratrapage numero de Version + +Revision 0.70 2010/01/01 12:58:32 safe +upgrade version + +Revision 0.6.0.20 2010/01/01 12:58:32 safe +33 distribution operationnel dans vzgot + +#================================================================================= + +Revision 0.6.0.19 2009/12/31 21:29:48 safe +ajustement de l'addition des RPM extra dans un container prise V + +#================================================================================= + +Revision 0.6.0.18 2009/12/31 21:27:38 safe +ajustement de l'addition des RPM extra dans un container prise IV + +#================================================================================= + +Revision 0.6.0.17 2009/12/31 21:18:34 safe +ajustement de l'addition des RPM extra dans un container prise III + +#================================================================================= + +Revision 0.6.0.16 2009/12/31 21:11:01 safe +ajustement de l'addition des RPM extra dans un container prise II + +#================================================================================= + +Revision 0.6.0.15 2009/12/31 21:00:43 safe +ajustement de l'addition des RPM extra dans un container + +#================================================================================= + +Revision 0.6.0.14 2009/12/31 20:23:55 safe +inclusion rpm iputils dans el4.7-ix86-64 + +#================================================================================= + +Revision 0.6.0.13 2009/12/31 17:45:07 safe +correction personlity pour x86_64 + +#================================================================================= + +Revision 0.6.0.12 2009/12/31 15:10:36 safe +correction vzgot.fboot.redhat, pour l'extraction des numero IP des alias + +#================================================================================= + +Revision 0.6.0.11 2009/12/31 03:12:54 safe +container el4.7 operationel + +#================================================================================= + +Revision 0.6.0.10 2009/12/31 00:43:44 safe +on prend en compte l'architecture Prise VII +definition de la variable LD_ASSUME_KERNEL + +#================================================================================= + +Revision 0.6.0.9 2009/12/31 00:41:23 safe +on prend en compte l'architecture Prise VI +definition de la variable LD_ASSUME_KERNEL + +#================================================================================= + +Revision 0.6.0.8 2009/12/31 00:22:20 safe +on prend en compte l'architecture Prise V + +#================================================================================= + +Revision 0.6.0.7 2009/12/30 19:29:48 safe +on prend en compte l'architecture Prise IV + +#================================================================================= + +Revision 0.6.0.6 2009/12/30 19:27:27 safe +on prend en compte l'architecture Prise III + +#================================================================================= + +Revision 0.6.0.5 2009/12/30 19:27:08 safe +on prend en compte l'architecture + +#================================================================================= + +Revision 0.6.0.4 2009/12/30 19:24:59 safe +on prend en compte l'architecture + +#================================================================================= + +Revision 0.6.0.3 2009/12/30 18:45:46 safe +Mise en place du traietemnt de l'architecture + +#================================================================================= + +Revision 0.6.0.2 2009/12/30 15:20:47 safe +verification problem RPM de rh9 + +#================================================================================= + +Revision 0.6.0.1 2009/12/30 15:18:18 safe +RPM pour rh9 + +#================================================================================= + +Revision 0.6.0.0 2009/12/30 15:04:54 safe +Ratrapage numero de Version + +Revision 0.6 2009/12/30 15:04:54 safe +upgrade version + +Revision 0.5.0.112 2009/12/30 15:04:54 safe +Passage a la versions 0.6 + +#================================================================================= + +Revision 0.5.0.111 2009/12/30 15:04:28 safe +inclusion de procps pour rh8.0 + +#================================================================================= + +Revision 0.5.0.110 2009/12/29 21:00:51 safe +verifications installation Prise II + +#================================================================================= + +Revision 0.5.0.109 2009/12/29 20:57:52 safe +verifications installation + +#================================================================================= + +Revision 0.5.0.108 2009/12/29 20:55:25 safe +debugging de vzgot.fboot.redhat prise XII + +#================================================================================= + +Revision 0.5.0.107 2009/12/29 20:49:15 safe +debugging de vzgot.fboot.redhat prise XI + +#================================================================================= + +Revision 0.5.0.106 2009/12/29 20:42:34 safe +debugging de vzgot.fboot.redhat prise X + +#================================================================================= + +Revision 0.5.0.105 2009/12/29 20:40:57 safe +debugging de vzgot.fboot.redhat prise IX + +#================================================================================= + +Revision 0.5.0.104 2009/12/29 20:37:12 safe +debugging de vzgot.fboot.redhat prise VIII + +#================================================================================= + +Revision 0.5.0.103 2009/12/29 20:31:46 safe +debugging de vzgot.fboot.redhat prise VII + +#================================================================================= + +Revision 0.5.0.102 2009/12/29 20:27:57 safe +debugging de vzgot.fboot.redhat prise VI + +#================================================================================= + +Revision 0.5.0.101 2009/12/29 20:16:14 safe +debugging de vzgot.fboot.redhat prise V + +#================================================================================= + +Revision 0.5.0.100 2009/12/29 20:12:58 safe +debugging de vzgot.fboot.redhat prise IV + +#================================================================================= + +Revision 0.5.0.99 2009/12/29 19:43:25 safe +debugging de vzgot.fboot.redhat prise III + +#================================================================================= + +Revision 0.5.0.98 2009/12/29 19:40:03 safe +debugging de vzgot.fboot.redhat prise II + +#================================================================================= + +Revision 0.5.0.97 2009/12/29 19:37:13 safe +debugging de vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.96 2009/12/29 19:25:53 safe +mise en place du repertoir etc + +#================================================================================= + +Revision 0.5.0.95 2009/12/28 21:33:55 safe +Ajustement du nom des interfaces veth prise VIII +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.94 2009/12/28 21:24:40 safe +Ajustement du nom des interfaces veth prise VII +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.93 2009/12/28 21:06:38 safe +Ajustement du nom des interfaces veth prise VI +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.92 2009/12/28 21:01:26 safe +Ajustement du nom des interfaces veth prise V +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.91 2009/12/28 21:00:28 safe +Ajustement du nom des interfaces veth prise IV +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.90 2009/12/28 20:49:31 safe +Ajustement du nom des interfaces veth prise III +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.89 2009/12/28 20:48:19 safe +Ajustement du nom des interfaces veth prise II +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.88 2009/12/28 20:42:38 safe +Ajustement du nom des interfaces veth +utilisation du numero de pid + +#================================================================================= + +Revision 0.5.0.87 2009/12/28 20:20:14 safe +Creation du shell vzgot.mksrvz, prise V + +#================================================================================= + +Revision 0.5.0.86 2009/12/28 20:16:00 safe +Creation du shell vzgot.mksrvz, prise IV + +#================================================================================= + +Revision 0.5.0.85 2009/12/28 20:13:23 safe +Creation du shell vzgot.mksrvz, prise III + +#================================================================================= + +Revision 0.5.0.84 2009/12/28 20:08:51 safe +Creation du shell vzgot.mksrvz, prise II + +#================================================================================= + +Revision 0.5.0.83 2009/12/28 20:05:55 safe +Creation du shell vzgot.mksrvz + +#================================================================================= + +Revision 0.5.0.82 2009/12/28 16:01:21 safe +Mise en place la fonction destroy prise III + +#================================================================================= + +Revision 0.5.0.81 2009/12/28 15:59:31 safe +Mise en place la fonction destroy prise II + +#================================================================================= + +Revision 0.5.0.80 2009/12/28 15:55:38 safe +Mise en place la fonction destroy prise I + +#================================================================================= + +Revision 0.5.0.79 2009/12/28 15:36:35 safe +Mise en place la fonction create Prise X (fin) + +#================================================================================= + +Revision 0.5.0.78 2009/12/28 15:35:02 safe +Mise en place la fonction create Prise IX + +#================================================================================= + +Revision 0.5.0.77 2009/12/28 15:33:28 safe +Mise en place la fonction create Prise VIII + +#================================================================================= + +Revision 0.5.0.76 2009/12/28 15:31:56 safe +Mise en place la fonction create Prise VII + +#================================================================================= + +Revision 0.5.0.75 2009/12/28 04:02:07 safe +Mise en place la fonction create Prise VI + +#================================================================================= + +Revision 0.5.0.74 2009/12/28 03:58:31 safe +Mise en place la fonction create Prise V + +#================================================================================= + +Revision 0.5.0.73 2009/12/28 03:56:20 safe +Mise en place la fonction create Prise IV + +#================================================================================= + +Revision 0.5.0.72 2009/12/28 03:27:02 safe +Mise en place la fonction create Prise III + +#================================================================================= + +Revision 0.5.0.71 2009/12/28 03:23:49 safe +Mise en place la fonction create Prise II + +#================================================================================= + +Revision 0.5.0.70 2009/12/28 03:19:34 safe +Mise en place la fonction create + +#================================================================================= + +Revision 0.5.0.69 2009/12/27 03:22:00 safe +on met en place fastboot pour permettre le demarrage Prise II + +#================================================================================= + +Revision 0.5.0.68 2009/12/27 03:19:50 safe +on met en place fastboot pour permettre le demarrage + +#================================================================================= + +Revision 0.5.0.67 2009/12/27 02:49:30 safe +on revient en arriere sur Unsharing data. + +#================================================================================= + +Revision 0.5.0.66 2009/12/27 01:14:03 safe +Unsharing data (to avoid dmesg) Prise II + +#================================================================================= + +Revision 0.5.0.65 2009/12/27 01:12:46 safe +Unsharing data (to avoid dmesg) + +#================================================================================= + +Revision 0.5.0.64 2009/12/27 01:03:49 safe +Permission du privilege CAP_SYS_ADMIN +(permission de faire des mounts) + +#================================================================================= + +Revision 0.5.0.63 2009/12/27 00:50:35 safe +suppresion du privilege CAP_SYS_ADMIN, pour ne plus +avoir access a dmesg? + +#================================================================================= + +Revision 0.5.0.62 2009/12/23 01:07:09 safe +modification de la routine pour elever des privileges. +prctl(PR_CAPBSET_DROP,todrop[i],0,0,0) + +#================================================================================= + +Revision 0.5.0.61 2009/12/23 00:39:46 safe +Le container ne plus metrtre l'horloge system a jours +prctl (PR_CAPBSET_DROP,CAP_SYS_BOOT|CAP_SYS_TIME.....) + +#================================================================================= + +Revision 0.5.0.60 2009/12/20 14:45:33 safe +Correction du shell vzgot.fboot.redhat +ajout des informations dans fstab + +#================================================================================= + +Revision 0.5.0.59 2009/12/20 01:33:10 safe +Correction du shell vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.58 2009/12/20 01:30:48 safe +Correction du shell vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.57 2009/12/20 01:25:31 safe +Creation du shell vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.56 2009/12/20 01:25:14 safe +Creation du shell vzgot.fboot.redhat + +#================================================================================= + +Revision 0.5.0.55 2009/12/19 19:15:24 safe +ajustements VZLIB prise III + +#================================================================================= + +Revision 0.5.0.54 2009/12/19 19:13:21 safe +ajustements VZLIB + +#================================================================================= + +Revision 0.5.0.53 2009/12/19 19:10:41 safe +Correction path viarial config VZLIB + +#================================================================================= + +Revision 0.5.0.52 2009/12/19 19:08:32 safe +Correction path pour fichier locks + +#================================================================================= + +Revision 0.5.0.51 2009/12/19 19:06:47 safe +Correction des shell pour incluse vzdir prise II + +#================================================================================= + +Revision 0.5.0.50 2009/12/19 19:01:21 safe +Correction des shell pour incluse vzdir prise II + +#================================================================================= + +Revision 0.5.0.49 2009/12/19 18:59:14 safe +Correction des shell pour incluse vzdir + +#================================================================================= + +Revision 0.5.0.48 2009/12/19 18:50:34 safe +creation du repertoir /var/lib/vzgot/vzdir + +#================================================================================= + +Revision 0.5.0.47 2009/12/19 18:42:07 safe +deplacement des fichier shell dans /var/lib/vzgot/shell prise IV +on cherche dans /var/lib/vzgot, sans specifier le numero de version + +#================================================================================= + +Revision 0.5.0.46 2009/12/19 18:41:14 safe +deplacement des fichier shell dans /var/lib/vzgot/shell prise III +on cherche dans /var/lib/vzgot, sans specifier le numero de version + +#================================================================================= + +Revision 0.5.0.45 2009/12/19 18:39:44 safe +deplacement des fichier shell dans /var/lib/vzgot/shell prise II? + +#================================================================================= + +Revision 0.5.0.44 2009/12/19 18:36:13 safe +deplacement des fichier shell dans /var/lib/vzgot/shell + +#================================================================================= + +Revision 0.5.0.43 2009/12/19 05:48:05 safe +mise au point de vzgot.fboot prise I + +#================================================================================= + +Revision 0.5.0.42 2009/12/19 00:47:58 safe +Premier essais de vzgot.fboot prise XXIV + +#================================================================================= + +Revision 0.5.0.41 2009/12/19 00:46:28 safe +Premier essais de vzgot.fboot prise XXIII + +#================================================================================= + +Revision 0.5.0.40 2009/12/19 00:45:05 safe +Premier essais de vzgot.fboot prise XXII + +#================================================================================= + +Revision 0.5.0.39 2009/12/19 00:43:36 safe +Premier essais de vzgot.fboot prise XXI + +#================================================================================= + +Revision 0.5.0.38 2009/12/19 00:04:33 safe +Premier essais de vzgot.fboot prise XX + +#================================================================================= + +Revision 0.5.0.37 2009/12/19 00:01:11 safe +Premier essais de vzgot.fboot prise XIX + +#================================================================================= + +Revision 0.5.0.36 2009/12/18 23:58:43 safe +Premier essais de vzgot.fboot prise XVIII + +#================================================================================= + +Revision 0.5.0.35 2009/12/18 23:57:29 safe +Premier essais de vzgot.fboot prise XVII + +#================================================================================= + +Revision 0.5.0.34 2009/12/18 23:56:43 safe +Premier essais de vzgot.fboot prise XVI + +#================================================================================= + +Revision 0.5.0.33 2009/12/18 23:55:27 safe +Premier essais de vzgot.fboot prise XV + +#================================================================================= + +Revision 0.5.0.32 2009/12/18 23:51:57 safe +Premier essais de vzgot.fboot prise XIV + +#================================================================================= + +Revision 0.5.0.31 2009/12/18 23:51:02 safe +Premier essais de vzgot.fboot prise XIII + +#================================================================================= + +Revision 0.5.0.30 2009/12/16 03:56:29 safe +Premier essais de vzgot.fboot prise XII + +#================================================================================= + +Revision 0.5.0.29 2009/12/16 03:54:01 safe +Premier essais de vzgot.fboot prise XI + +#================================================================================= + +Revision 0.5.0.28 2009/12/16 03:39:20 safe +Premier essais de vzgot.fboot prise X + +#================================================================================= + +Revision 0.5.0.27 2009/12/16 03:35:44 safe +Premier essais de vzgot.fboot prise IX + +#================================================================================= + +Revision 0.5.0.26 2009/12/16 03:34:27 safe +Premier essais de vzgot.fboot prise VIII + +#================================================================================= + +Revision 0.5.0.25 2009/12/16 03:32:38 safe +Premier essais de vzgot.fboot prise VII + +#================================================================================= + +Revision 0.5.0.24 2009/12/16 03:29:19 safe +Premier essais de vzgot.fboot prise VI + +#================================================================================= + +Revision 0.5.0.23 2009/12/16 03:26:48 safe +Premier essais de vzgot.fboot prise V + +#================================================================================= + +Revision 0.5.0.22 2009/12/16 03:25:43 safe +Premier essais de vzgot.fboot prise IV + +#================================================================================= + +Revision 0.5.0.21 2009/12/16 03:23:55 safe +Premier essais de vzgot.fboot prise III + +#================================================================================= + +Revision 0.5.0.20 2009/12/16 03:21:27 safe +Premier essais de vzgot.fboot prise II + +#================================================================================= + +Revision 0.5.0.19 2009/12/16 03:16:08 safe +Premier essais de vzgot.fboot + +#================================================================================= + +Revision 0.5.0.18 2009/12/16 02:30:12 safe +insertion du nom de la distribution + +#================================================================================= + +Revision 0.5.0.17 2009/12/16 02:21:09 safe +modification appel a strcpy Prise II + +#================================================================================= + +Revision 0.5.0.16 2009/12/16 02:16:56 safe +modification appel a strcpy + +#================================================================================= + +Revision 0.5.0.15 2009/12/15 05:49:02 safe +creation de la command firstboot prise XIII + +#================================================================================= + +Revision 0.5.0.14 2009/12/15 05:48:06 safe +creation de la command firstboot prise XII + +#================================================================================= + +Revision 0.5.0.13 2009/12/15 05:45:59 safe +creation de la command firstboot prise XI + +#================================================================================= + +Revision 0.5.0.12 2009/12/15 05:42:20 safe +creation de la command firstboot prise X + +#================================================================================= + +Revision 0.5.0.11 2009/12/15 05:40:30 safe +creation de la command firstboot prise IX + +#================================================================================= + +Revision 0.5.0.10 2009/12/15 05:39:32 safe +creation de la command firstboot prise VIII + +#================================================================================= + +Revision 0.5.0.9 2009/12/15 05:38:28 safe +creation de la command firstboot prise VII + +#================================================================================= + +Revision 0.5.0.8 2009/12/15 04:20:50 safe +creation de la command firstboot prise VI + +#================================================================================= + +Revision 0.5.0.7 2009/12/15 04:07:31 safe +creation de la command firstboot prise V + +#================================================================================= + +Revision 0.5.0.6 2009/12/15 04:05:02 safe +creation de la command firstboot prise IV + +#================================================================================= + +Revision 0.5.0.5 2009/12/15 03:26:48 safe +creation de la command firstboot prise III + +#================================================================================= + +Revision 0.5.0.4 2009/12/15 03:24:13 safe +creation de la command firstboot prise III + +#================================================================================= + +Revision 0.5.0.3 2009/12/15 03:20:08 safe +creation de la command firstboot prise III + +#================================================================================= + +Revision 0.5.0.2 2009/12/15 03:09:13 safe +creation de la command firstboot prise II + +#================================================================================= + +Revision 0.5.0.1 2009/12/15 03:01:35 safe +creation de la command firstboot + +#================================================================================= + +Revision 0.5.0.0 2009/12/14 15:07:23 safe +Ratrapage numero de Version + +Revision 0.5 2009/12/14 15:07:23 safe +upgrade version + +Revision 0.4.0.16 2009/12/14 15:07:23 safe +version de vzgot globalement operationnel + +#================================================================================= + +Revision 0.4.0.15 2009/12/14 15:04:51 safe +problem de kill prise IX (Le crash semble lie au kernel) + +#================================================================================= + +Revision 0.4.0.14 2009/12/14 14:55:05 safe +problem de kill prise VIII (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.13 2009/12/14 14:52:56 safe +problem de kill prise VII (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.12 2009/12/14 14:46:13 safe +problem de kill prise VI (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.11 2009/12/14 04:10:38 safe +problem de kill prise V (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.10 2009/12/14 04:04:42 safe +problem de kill prise IV (problem crash dans /var/log/messages) + +#================================================================================= + +Revision 0.4.0.9 2009/12/14 03:56:28 safe +problem de kill prise III (detection de process courant) + +#================================================================================= + +Revision 0.4.0.8 2009/12/14 03:38:30 safe +problem de kill prise II (le numero n'etait pas le bon) + +#================================================================================= + +Revision 0.4.0.7 2009/12/14 03:38:16 safe +problem de kill prise II (le numero n'etait pas le bon) + +#================================================================================= + +Revision 0.4.0.6 2009/12/14 03:26:50 safe +problem de kill + +#================================================================================= + +Revision 0.4.0.5 2009/12/14 03:23:54 safe +divedivedive etait toujours mal place mal place + +#================================================================================= + +Revision 0.4.0.4 2009/12/14 03:18:01 safe +divedivedive etaitt mal place + +#================================================================================= + +Revision 0.4.0.3 2009/12/14 03:08:00 safe +verification fonctionnement vzgot avec /bin/bash prise II + +#================================================================================= + +Revision 0.4.0.2 2009/12/14 03:05:30 safe +verification fonctionnement vzgot avec /bin/bash + +#================================================================================= + +Revision 0.4.0.1 2009/12/14 02:59:28 safe +essais du vz shutdown + +#================================================================================= + +Revision 0.4.0.0 2009/12/13 20:20:32 safe +Ratrapage numero de Version + +Revision 0.4 2009/12/13 20:20:32 safe +upgrade version + +Revision 0.2.0.71 2009/12/13 20:20:32 safe +device close et vzgot boot operationel + +#================================================================================= + +Revision 0.2.0.70 2009/12/13 20:15:50 safe +closing device... prise VI + +#================================================================================= + +Revision 0.2.0.69 2009/12/13 20:13:17 safe +closing device... prise V + +#================================================================================= + +Revision 0.2.0.68 2009/12/13 20:04:57 safe +closing device... prise IV + +#================================================================================= + +Revision 0.2.0.67 2009/12/13 20:00:56 safe +closing device... prise III + +#================================================================================= + +Revision 0.2.0.66 2009/12/13 19:51:29 safe +closing device... + +#================================================================================= + +Revision 0.2.0.65 2009/12/13 19:47:03 safe +eliminer le reboot du host par le container (prctl) + +#================================================================================= + +Revision 0.2.0.64 2009/12/13 05:21:44 safe +eliminer le reboot du host par le container (prctl) + +#================================================================================= + +Revision 0.2.0.63 2009/12/13 04:27:17 safe +Verification gestion des signaux Prise IV + +#================================================================================= + +Revision 0.2.0.62 2009/12/13 04:22:40 safe +Verification gestion des signaux Prise III + +#================================================================================= + +Revision 0.2.0.61 2009/12/13 04:17:44 safe +Verification gestion des signaux Prise II + +#================================================================================= + +Revision 0.2.0.60 2009/12/13 03:48:18 safe +Verification gestion des signaux + +#================================================================================= + +Revision 0.2.0.59 2009/12/13 03:25:40 safe +Interception des signaux SIGQUIT,SIGINT et SIGTERM Prise II + +#================================================================================= + +Revision 0.2.0.58 2009/12/13 01:45:07 safe +Interception des signaux SIGQUIT,SIGINT et SIGTERM + +#================================================================================= + +Revision 0.2.0.57 2009/12/13 01:11:31 safe +Gestion du routage up and down + +#================================================================================= + +Revision 0.2.0.56 2009/12/13 00:48:00 safe +mise en place du routage des numero IP utilise par +le container + +#================================================================================= + +Revision 0.2.0.55 2009/12/12 20:10:18 safe +on revient a la config veth + +#================================================================================= + +Revision 0.2.0.54 2009/12/12 20:08:44 safe +la configuration macvlan ne semble aller nul part + +#================================================================================= + +Revision 0.2.0.53 2009/12/12 11:33:01 safe +test de la configuration avec des interface de type macvlan prise IV + +#================================================================================= + +Revision 0.2.0.52 2009/12/12 11:31:29 safe +test de la configuration avec des interface de type macvlan prise III + +#================================================================================= + +Revision 0.2.0.51 2009/12/12 11:30:41 safe +test de la configuration avec des interface de type macvlan prise II + +#================================================================================= + +Revision 0.2.0.50 2009/12/12 11:28:31 safe +test de la configuration avec des interface de type macvlan + +#================================================================================= + +Revision 0.2.0.49 2009/12/11 22:09:00 safe +mise en route de vzgot.start, declaration de ETHNAME dans la config + +#================================================================================= + +Revision 0.2.0.48 2009/12/11 22:04:34 safe +mise en route de vzgot.start + +#================================================================================= + +Revision 0.2.0.47 2009/12/11 21:24:54 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise VIII + +#================================================================================= + +Revision 0.2.0.46 2009/12/11 21:22:45 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise VII + +#================================================================================= + +Revision 0.2.0.45 2009/12/11 21:20:29 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise VI + +#================================================================================= + +Revision 0.2.0.44 2009/12/11 21:17:23 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise V + +#================================================================================= + +Revision 0.2.0.43 2009/12/11 21:16:05 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise IV + +#================================================================================= + +Revision 0.2.0.42 2009/12/11 21:13:10 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise III + +#================================================================================= + +Revision 0.2.0.41 2009/12/11 21:05:29 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container prise II + +#================================================================================= + +Revision 0.2.0.40 2009/12/11 20:00:54 safe +mise au point du schema SIGSTOP/SIGCONT pour synchronniser le container + +#================================================================================= + +Revision 0.2.0.39 2009/12/11 19:30:49 safe +test delay de wakup du VZ container + +#================================================================================= + +Revision 0.2.0.38 2009/12/11 03:43:19 safe +essais du pipe pour vzgot.init, prise VI + +#================================================================================= + +Revision 0.2.0.37 2009/12/11 03:34:29 safe +essais du pipe pour vzgot.init, prise V + +#================================================================================= + +Revision 0.2.0.36 2009/12/11 03:30:13 safe +essais du pipe pour vzgot.init, prise IV + +#================================================================================= + +Revision 0.2.0.35 2009/12/11 03:28:38 safe +essais du pipe pour vzgot.init, prise III + +#================================================================================= + +Revision 0.2.0.34 2009/12/11 03:26:13 safe +essais du pipe pour vzgot.init, prise II + +#================================================================================= + +Revision 0.2.0.33 2009/12/11 03:20:02 safe +premier essais du pipe pou vzgot.init + +#================================================================================= + +Revision 0.2.0.32 2009/12/10 20:11:47 safe +premier essait du fichier vzgot.init prise IV (test valeur de retour) + +#================================================================================= + +Revision 0.2.0.31 2009/12/10 20:07:17 safe +premier essait du fichier vzgot.init prise III (test valeur de retour) + +#================================================================================= + +Revision 0.2.0.30 2009/12/10 19:57:55 safe +premier essait du fichier vzgot.init prise II + +#================================================================================= + +Revision 0.2.0.29 2009/12/10 19:54:54 safe +premier essait du fichier vzgot.init + +#================================================================================= + +Revision 0.2.0.28 2009/12/10 19:49:27 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XV + +#================================================================================= + +Revision 0.2.0.27 2009/12/10 19:48:43 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XIV + +#================================================================================= + +Revision 0.2.0.26 2009/12/10 19:47:35 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XIII + +#================================================================================= + +Revision 0.2.0.25 2009/12/10 19:46:59 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XII + +#================================================================================= + +Revision 0.2.0.24 2009/12/10 19:44:55 safe +verification update fichier config /etc/vzgoot/vzgot_config prise XI + +#================================================================================= + +Revision 0.2.0.23 2009/12/10 19:44:22 safe +verification update fichier config /etc/vzgoot/vzgot_config prise X + +#================================================================================= + +Revision 0.2.0.22 2009/12/10 19:43:41 safe +verification update fichier config /etc/vzgoot/vzgot_config prise IX + +#================================================================================= + +Revision 0.2.0.21 2009/12/10 19:42:37 safe +verification update fichier config /etc/vzgoot/vzgot_config prise VIII + +#================================================================================= + +Revision 0.2.0.20 2009/12/10 19:42:03 safe +verification update fichier config /etc/vzgoot/vzgot_config prise VII + +#================================================================================= + +Revision 0.2.0.19 2009/12/10 19:41:13 safe +verification update fichier config /etc/vzgoot/vzgot_config prise VI + +#================================================================================= + +Revision 0.2.0.18 2009/12/10 19:38:48 safe +verification update fichier config /etc/vzgoot/vzgot_config prise V + +#================================================================================= + +Revision 0.2.0.17 2009/12/10 19:37:26 safe +verification update fichier config /etc/vzgoot/vzgot_config prise IV + +#================================================================================= + +Revision 0.2.0.16 2009/12/10 19:36:24 safe +verification update fichier config /etc/vzgoot/vzgot_config prise III + +#================================================================================= + +Revision 0.2.0.15 2009/12/10 19:35:46 safe +verification update fichier config /etc/vzgoot/vzgot_config prise II + +#================================================================================= + +Revision 0.2.0.14 2009/12/10 19:33:52 safe +verification update fichier config /etc/vzgoot/vzgot_config + +#================================================================================= + +Revision 0.2.0.13 2009/12/10 19:32:34 safe +verification mod de vzgot.init + +#================================================================================= + +Revision 0.2.0.12 2009/12/10 19:31:02 safe +mise en place de vzgot_config + +#================================================================================= + +Revision 0.2.0.11 2009/12/10 03:51:34 safe +verification update + +#================================================================================= + +Revision 0.2.0.10 2009/12/10 03:37:42 safe +mise en place du repertoire shell + +#================================================================================= + +Revision 0.2.0.9 2009/12/08 22:45:02 safe +exploration de la mise en place reseau + +#================================================================================= + +Revision 0.2.0.8 2009/12/08 22:09:57 safe +Initialisation de /etc/mtab dans le container + +#================================================================================= + +Revision 0.2.0.7 2009/12/08 21:52:26 safe +mise en place du fichier PID. + +#================================================================================= + +Revision 0.2.0.6 2009/12/08 16:39:58 safe +test detachement direct prise V + +#================================================================================= + +Revision 0.2.0.5 2009/12/08 16:37:08 safe +test detachement direct prise IV + +#================================================================================= + +Revision 0.2.0.4 2009/12/08 16:32:55 safe +test detachement direct prise III + +#================================================================================= + +Revision 0.2.0.3 2009/12/08 16:31:08 safe +test detachement direct II + +#================================================================================= + +Revision 0.2.0.2 2009/12/08 16:28:37 safe +test detachement direct + +#================================================================================= + +Revision 0.2.0.1 2009/12/08 15:25:27 safe +test du kill du master (/sbin/init) + +#================================================================================= + +Revision 0.2.0.0 2009/12/08 05:08:35 safe +Ratrapage numero de Version + +Revision 0.2 2009/12/08 05:08:35 safe +upgrade version + +Revision 0.1.0.24 2009/12/08 05:08:35 safe +Upgrade des numeros de versions RCS + +#================================================================================= + +Revision 0.1.0.23 2009/12/08 04:28:50 safe +Upgrade des numero de versions RCS + +#================================================================================= + +Revision 0.1.0.22 2009/12/08 04:28:25 safe +Upgrade des numero de versions RCS + +Revision 0.1.0.21 2009/12/08 04:25:42 safe +Upgrade des numero de versions RCS + +#================================================================================= + +Revision 0.1.0.20 2009/12/08 04:20:53 safe +pivot_root operationnel, +fonctionne avec /bin/bash + +#================================================================================= + +Revision 0.1.0.19 2009/12/08 04:20:28 safe +pivot_root operationnel, +fonctionne avec /bin/bash + +#================================================================================= + +Revision 0.1.0.18 2009/12/08 04:19:30 safe +pivot_root operationnel, +fonctionne avec /bin/bash + +#================================================================================= + +Revision 0.1.0.17 2009/12/08 04:14:53 safe +test du pivot_root prise V (test OK?) + +#================================================================================= + +Revision 0.1.0.16 2009/12/08 04:10:59 safe +test du pivot_root prise IV + +#================================================================================= + +Revision 0.1.0.15 2009/12/08 04:09:00 safe +test du pivot_root prise III + +#================================================================================= + +Revision 0.1.0.14 2009/12/08 03:49:48 safe +test du pivot_root prise II + +#================================================================================= + +Revision 0.1.0.13 2009/12/08 03:47:44 safe +test du pivot_root prise I + +#================================================================================= + +Revision 0.1.0.12 2009/12/08 03:42:48 safe +le pivot_root est executable + +#================================================================================= + +Revision 0.1.0.11 2009/12/07 21:55:59 safe +test de vzboot sur delson prise IV +option + dans getopt + +#================================================================================= + +Revision 0.1.0.10 2009/12/07 21:46:18 safe +test de vzboot sur delson prise III + +#================================================================================= + +Revision 0.1.0.9 2009/12/07 21:44:42 safe +test de vzboot sur delson prise II + +#================================================================================= + +Revision 0.1.0.8 2009/12/07 21:41:51 safe +test de vzboot sur delson + +#================================================================================= + +Revision 0.1.0.7 2009/12/07 18:31:58 safe +definition du programme 'generic' vzgot qui +va faire les actions: boot,shutdown,freeze,warmup + +#================================================================================= + +Revision 0.1.0.6 2009/12/07 06:06:05 safe +capacite faire un lock du container + +#================================================================================= + +Revision 0.1.0.5 2009/12/07 03:49:10 safe +capacite de RPM, test deployement du rpm sur delson + +#================================================================================= + +Revision 0.1.0.4 2009/12/07 03:46:29 safe +capacite de RPM, test d'ebauche sur delson + +#================================================================================= + +Revision 0.1.0.3 2009/12/07 02:15:20 safe +inclusion de vzboot.c dans les RCS + +#================================================================================= + +Revision 0.1.0.2 2009/12/07 02:14:00 safe +ebauche du programme vzboot + +Revision 0.1.0.1 2009/12/07 02:14:00 safe +Ratrapage numero de Version + +Revision 0.1 2009/12/07 02:14:00 safe +Creation +#================================================================================= +@ + + +0.84.0.0 +log +@Ratrapage numero de Version +@ +text +@a5 3 +Revision 0.84 2010/03/06 16:39:08 jmp +upgrade version + +@ + + +0.83 +log +@Creation +#================================================================================= +@ +text +@d6 10 +@ + + +0.83.0.0 +log +@Ratrapage numero de Version +@ +text +@a5 4 +Revision 0.83 2010/03/06 16:39:08 jmp +Creation +#================================================================================= + +@ + + +0.83.0.1 +log +@Mise en place su GIT +@ +text +@a5 3 +Revision 0.83.0.0 2010/03/06 16:39:08 jmp +Ratrapage numero de Version + +@ diff --git a/support/RCS/sauver,v b/support/RCS/sauver,v new file mode 100755 index 0000000..5e1490d --- /dev/null +++ b/support/RCS/sauver,v @@ -0,0 +1,161 @@ +head 0.84; +access; +symbols; +locks + jmp:0.84.0.0; strict; +comment @# @; + + +0.84 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.84.0.0; +next 0.83; + +0.83 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.83.0.0; +next ; + +0.83.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next 0.83.0.1; + +0.83.0.1 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + +0.84.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + + +desc +@#! /bin/sh +#----------------------------------------------- +MSG=" +Mise en place su GIT +" +#----------------------------------------------- +REV="$Revision: 0.83.0.0 $" +VERS=`echo $REV | cut -d' ' -f2 - ` +NUM=`echo $REV | cut -d' ' -f2 | cut -d'.' -f1,2` +#NXTVER doit etre activer pour un changement de version +#et mis en commentaire apres +NXTVER="0.84" +#----------------------------------------------- +for i in $* + do + LINE=" +#================================================================================= + +" + if ! [ -f RCS/$i,v ]; then + ci -q -r$NUM -f -l -m"Creation $LINE" $i < $i + ci -q -r$VERS -f -l -m"Ratrapage numero de Version" $i + LINE="" + fi + ci -q -f -l -m"$MSG $LINE" $i + #to upgrade a version! + if [ -n "$NXTVER" ] ; then + rcs -q -u $i + co -q -l -p$NUM $i > /dev/null + ci -q -r$NXTVER -f -l -m"upgrade version" $i < $i + ci -q -r$NXTVER.0.0 -f -l -m"Ratrapage numero de Version" $i + fi + echo `rlog -L -l $i | grep vision | grep locked | grep \`id -n -u\` |tr '\t' ' '|cut -d' ' -f2`"---->" $i + done +exit +@ + + +0.84 +log +@upgrade version +@ +text +@#! /bin/sh +#----------------------------------------------- +MSG=" +Mise en place su GIT +" +#----------------------------------------------- +REV="$Revision: 0.83.0.1 $" +VERS=`echo $REV | cut -d' ' -f2 - ` +NUM=`echo $REV | cut -d' ' -f2 | cut -d'.' -f1,2` +#NXTVER doit etre activer pour un changement de version +#et mis en commentaire apres +NXTVER="0.84" +#----------------------------------------------- +for i in $* + do + LINE=" +#================================================================================= + +" + if ! [ -f RCS/$i,v ]; then + ci -q -r$NUM -f -l -m"Creation $LINE" $i < $i + ci -q -r$VERS -f -l -m"Ratrapage numero de Version" $i + LINE="" + fi + ci -q -f -l -m"$MSG $LINE" $i + #to upgrade a version! + if [ -n "$NXTVER" ] ; then + rcs -q -u $i + co -q -l -p$NUM $i > /dev/null + ci -q -r$NXTVER -f -l -m"upgrade version" $i < $i + ci -q -r$NXTVER.0.0 -f -l -m"Ratrapage numero de Version" $i + fi + echo `rlog -L -l $i | grep vision | grep locked | grep \`id -n -u\` |tr '\t' ' '|cut -d' ' -f2`"---->" $i + done +exit +@ + + +0.84.0.0 +log +@Ratrapage numero de Version +@ +text +@d7 1 +a7 1 +REV="$Revision: 0.84 $" +@ + + +0.83 +log +@Creation +#================================================================================= +@ +text +@d7 1 +a7 1 +REV="$Revision: 0.83.0.0 $" +@ + + +0.83.0.0 +log +@Ratrapage numero de Version +@ +text +@d7 1 +a7 1 +REV="$Revision: 0.83 $" +@ + + +0.83.0.1 +log +@Mise en place su GIT +@ +text +@d7 1 +a7 1 +REV="$Revision: 0.83.0.0 $" +@ diff --git a/support/RCS/vzgot.spec,v b/support/RCS/vzgot.spec,v new file mode 100644 index 0000000..af6a47c --- /dev/null +++ b/support/RCS/vzgot.spec,v @@ -0,0 +1,387 @@ +head 0.84; +access; +symbols; +locks + jmp:0.84.0.0; strict; +comment @-- @; + + +0.84 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.84.0.0; +next 0.83; + +0.83 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches + 0.83.0.0; +next ; + +0.83.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next 0.83.0.1; + +0.83.0.1 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + +0.84.0.0 +date 2010.03.06.16.39.08; author jmp; state Exp; +branches; +next ; + + +desc +@#----------------------------------------------------------- +#Fichier des definition des SPEC d'installation +#----------------------------------------------------------- +#to define the revision numer +%define revision %(R="$Revision: 0.84.0.0 $"; RR="${R##: }"; echo ${RR%% ?}) +%define rversion %(echo %{revision} | cut -d'.' -f1-2) +%define rrelease %(echo %{revision}| cut -d'.' -f4) +%define revdate %(R="$Date: 2010/03/06 16:38:31 $"; RR="${R##: }"; echo ${RR%% ?}) +%define sversion %(echo %{revdate} | cut -d' ' -f1 | tr -d '/') +%define ddist %(echo %{?dist}| tr -d '.') +#----------------------------------------------------------- +%{?!mark:%define mark fedora} + +%if "%mark" == "fedora" +%define locmark %{?dist} +%endif + +%if "%mark" == "safe" +%define locmark .%{?dist}.%{mark} +%endif +#----------------------------------------------------------- +Name: vzgot +Summary: An application to drive linux container +Group: System Environment/Daemons +Version: %{rversion}.%{rrelease} +Release: %{?sversion}%{?locmark} +License: GPLv2 +Source: ftp://ftp.safe.ca/pub/srctgz/%{name}-%{version}.tgz +URL: http://www.%{name}.safe.ca/index.html +Vendor: SAFE Inc. +Requires: kernel >= 2.6.24 +Requires: util-linux-ng +Requires: bridge-utils +Requires: /usr/sbin/brctl,/sbin/ip,/bin/ps,/usr/bin/wc +Requires: /sbin/chkconfig +Requires: /bin/chmod,/bin/sed,/bin/sh,/bin/ln +#--------------------------------------------------------------- +buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + + +%description +vzgot is a set of tool to manage linux container +it allow to run a wide range of distribution +(from RH-7.3 to FC12, Centos-4.6 to Centos-5.3) +while using a plain linux kernel (above 2.6.24). + + +%files +#%defattr(0640,root,root,0755) +%doc %{name}-%{version}*.build_date +%doc README Changes QUICK-START +%{_var}/lock/%{name} +%{_var}/lib/%{name}/RPM +%{_var}/lib/%{name}/vzdir +%{_var}/lib/%{name}/etc/ssh +%{_var}/lib/%{name}/home +%{_var}/lib/%{name}/cgroup.d +%{_var}/lib/%{name}/vztemplate +%{_initrddir}/%{name} +%{_usr}/sbin/%{name} +%{_usr}/sbin/%{name}.mksrvz +%{_usr}/sbin/%{name}.redoall +%{_var}/lib/%{name}/shell/%{name}.net +%{_var}/lib/%{name}/shell/%{name}.fboot +%{_var}/lib/%{name}/shell/%{name}.fboot.redhat +%{_var}/lib/%{name}/shell/%{name}.fboot.debian +%{_var}/lib/%{name}/shell/%{name}.open +%{_var}/lib/%{name}/shell/%{name}.close +%{_var}/lib/%{name}/shell/%{name}.start +%{_var}/lib/%{name}/shell/%{name}.create +%{_var}/lib/%{name}/shell/%{name}.destroy + +%config(noreplace) %{_sysconfdir}/%{name}/vzgot_config +%config(noreplace) %{_sysconfdir}/%{name}/vzgot_list +%config(noreplace) %{_var}/lib/%{name}/etc/shadow +%config(noreplace) %{_var}/lib/%{name}/etc/resolv.conf +%config(noreplace) %{_var}/lib/%{name}/etc/groups +%config(noreplace) %{_var}/lib/%{name}/etc/users +%config(noreplace) %{_var}/lib/%{name}/etc/sudoers +%config(noreplace) %{_var}/lib/%{name}/etc/sysconfig/iptables +%config(noreplace) %{_var}/lib/%{name}/etc/snmp/snmpd.conf + +#----------------------------------------------------------- +#This is the RPM install/upgrade/remove directive +#----------------------------------------------------------- +#before install or upgrade +%pre + +#after install or upgrade +%post +if [ "$1" = 1 ]; then + /sbin/chkconfig %{name} on 2>/dev/null || : + #extracting HOST root password to be used as container common password + /bin/chmod 600 %{_var}/lib/%{name}/etc/shadow + /bin/sed 's/#.*//g' /etc/shadow | \ + grep -v '^[[:space:]]*$' | \ + grep root >> %{_var}/lib/%{name}/etc/shadow + #extracting HOST nameserver to be used by container + /bin/sed 's/#.*//g' /etc/resolv.conf \ + >> %{_var}/lib/%{name}/etc/resolv.conf + fi + +#before upgrade or remove +%postun + +#after upgrade or remove +%preun +if [ "$1" = 0 ]; then + %{_initrddir}/%{name} stop 2>/dev/null || : + /sbin/chkconfig --del %{name} 2>/dev/null || : + fi + +#----------------------------------------------------------- +#common part +#----------------------------------------------------------- +%prep + +%setup -q + +%build +%{__rm} -rf %{buildroot} +%{?_smp_mflags:%define _smp_mflags -j `/usr/bin/getconf _NPROCESSORS_ONLN`} +%{__make} -s %{?_smp_mflags} DIST=%{?ddist} prod + +%clean +%{__rm} -rf %{buildroot} + +%install +#main install +%{__rm} -fr %{buildroot} +mkdir -p -m0755 %{buildroot} +%{__make} -s install DESTDIR=%{buildroot} + +%changelog +* Mon Jan 4 2010 Jean-Marc Pigeon 0.71.6-20100104 +- Bug Fix + * In none debug flag, vzgot was not returning echo + from called shell + * Defining a 'FLINUX' env variable within shell script + vzgot.mksrvz to be pass to 'vzgot create' and used by + vzgot.fboot to prepare container with the right + linux family (RedHat,SUSE,...) structure + +* Sun Jan 3 2010 Jean-Marc Pigeon 0.71.3-20100104 + * First release +@ + + +0.84 +log +@upgrade version +@ +text +@#----------------------------------------------------------- +#Fichier des definition des SPEC d'installation +#----------------------------------------------------------- +#to define the revision numer +%define revision %(R="$Revision: 0.83.0.1 $"; RR="${R##: }"; echo ${RR%% ?}) +%define rversion %(echo %{revision} | cut -d'.' -f1-2) +%define rrelease %(echo %{revision}| cut -d'.' -f4) +%define revdate %(R="$Date: 2010/03/06 16:39:08 $"; RR="${R##: }"; echo ${RR%% ?}) +%define sversion %(echo %{revdate} | cut -d' ' -f1 | tr -d '/') +%define ddist %(echo %{?dist}| tr -d '.') +#----------------------------------------------------------- +%{?!mark:%define mark fedora} + +%if "%mark" == "fedora" +%define locmark %{?dist} +%endif + +%if "%mark" == "safe" +%define locmark .%{?dist}.%{mark} +%endif +#----------------------------------------------------------- +Name: vzgot +Summary: An application to drive linux container +Group: System Environment/Daemons +Version: %{rversion}.%{rrelease} +Release: %{?sversion}%{?locmark} +License: GPLv2 +Source: ftp://ftp.safe.ca/pub/srctgz/%{name}-%{version}.tgz +URL: http://www.%{name}.safe.ca/index.html +Vendor: SAFE Inc. +Requires: kernel >= 2.6.24 +Requires: util-linux-ng +Requires: bridge-utils +Requires: /usr/sbin/brctl,/sbin/ip,/bin/ps,/usr/bin/wc +Requires: /sbin/chkconfig +Requires: /bin/chmod,/bin/sed,/bin/sh,/bin/ln +#--------------------------------------------------------------- +buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + + +%description +vzgot is a set of tool to manage linux container +it allow to run a wide range of distribution +(from RH-7.3 to FC12, Centos-4.6 to Centos-5.3) +while using a plain linux kernel (above 2.6.24). + + +%files +#%defattr(0640,root,root,0755) +%doc %{name}-%{version}*.build_date +%doc README Changes QUICK-START +%{_var}/lock/%{name} +%{_var}/lib/%{name}/RPM +%{_var}/lib/%{name}/vzdir +%{_var}/lib/%{name}/etc/ssh +%{_var}/lib/%{name}/home +%{_var}/lib/%{name}/cgroup.d +%{_var}/lib/%{name}/vztemplate +%{_initrddir}/%{name} +%{_usr}/sbin/%{name} +%{_usr}/sbin/%{name}.mksrvz +%{_usr}/sbin/%{name}.redoall +%{_var}/lib/%{name}/shell/%{name}.net +%{_var}/lib/%{name}/shell/%{name}.fboot +%{_var}/lib/%{name}/shell/%{name}.fboot.redhat +%{_var}/lib/%{name}/shell/%{name}.fboot.debian +%{_var}/lib/%{name}/shell/%{name}.open +%{_var}/lib/%{name}/shell/%{name}.close +%{_var}/lib/%{name}/shell/%{name}.start +%{_var}/lib/%{name}/shell/%{name}.create +%{_var}/lib/%{name}/shell/%{name}.destroy + +%config(noreplace) %{_sysconfdir}/%{name}/vzgot_config +%config(noreplace) %{_sysconfdir}/%{name}/vzgot_list +%config(noreplace) %{_var}/lib/%{name}/etc/shadow +%config(noreplace) %{_var}/lib/%{name}/etc/resolv.conf +%config(noreplace) %{_var}/lib/%{name}/etc/groups +%config(noreplace) %{_var}/lib/%{name}/etc/users +%config(noreplace) %{_var}/lib/%{name}/etc/sudoers +%config(noreplace) %{_var}/lib/%{name}/etc/sysconfig/iptables +%config(noreplace) %{_var}/lib/%{name}/etc/snmp/snmpd.conf + +#----------------------------------------------------------- +#This is the RPM install/upgrade/remove directive +#----------------------------------------------------------- +#before install or upgrade +%pre + +#after install or upgrade +%post +if [ "$1" = 1 ]; then + /sbin/chkconfig %{name} on 2>/dev/null || : + #extracting HOST root password to be used as container common password + /bin/chmod 600 %{_var}/lib/%{name}/etc/shadow + /bin/sed 's/#.*//g' /etc/shadow | \ + grep -v '^[[:space:]]*$' | \ + grep root >> %{_var}/lib/%{name}/etc/shadow + #extracting HOST nameserver to be used by container + /bin/sed 's/#.*//g' /etc/resolv.conf \ + >> %{_var}/lib/%{name}/etc/resolv.conf + fi + +#before upgrade or remove +%postun + +#after upgrade or remove +%preun +if [ "$1" = 0 ]; then + %{_initrddir}/%{name} stop 2>/dev/null || : + /sbin/chkconfig --del %{name} 2>/dev/null || : + fi + +#----------------------------------------------------------- +#common part +#----------------------------------------------------------- +%prep + +%setup -q + +%build +%{__rm} -rf %{buildroot} +%{?_smp_mflags:%define _smp_mflags -j `/usr/bin/getconf _NPROCESSORS_ONLN`} +%{__make} -s %{?_smp_mflags} DIST=%{?ddist} prod + +%clean +%{__rm} -rf %{buildroot} + +%install +#main install +%{__rm} -fr %{buildroot} +mkdir -p -m0755 %{buildroot} +%{__make} -s install DESTDIR=%{buildroot} + +%changelog +* Mon Jan 4 2010 Jean-Marc Pigeon 0.71.6-20100104 +- Bug Fix + * In none debug flag, vzgot was not returning echo + from called shell + * Defining a 'FLINUX' env variable within shell script + vzgot.mksrvz to be pass to 'vzgot create' and used by + vzgot.fboot to prepare container with the right + linux family (RedHat,SUSE,...) structure + +* Sun Jan 3 2010 Jean-Marc Pigeon 0.71.3-20100104 + * First release +@ + + +0.84.0.0 +log +@Ratrapage numero de Version +@ +text +@d5 1 +a5 1 +%define revision %(R="$Revision: 0.84 $"; RR="${R##: }"; echo ${RR%% ?}) +@ + + +0.83 +log +@Creation +#================================================================================= +@ +text +@d5 1 +a5 1 +%define revision %(R="$Revision: 0.84.0.0 $"; RR="${R##: }"; echo ${RR%% ?}) +d8 1 +a8 1 +%define revdate %(R="$Date: 2010/03/06 16:38:31 $"; RR="${R##: }"; echo ${RR%% ?}) +@ + + +0.83.0.0 +log +@Ratrapage numero de Version +@ +text +@d5 1 +a5 1 +%define revision %(R="$Revision: 0.83 $"; RR="${R##: }"; echo ${RR%% ?}) +d8 1 +a8 1 +%define revdate %(R="$Date: 2010/03/06 16:39:08 $"; RR="${R##: }"; echo ${RR%% ?}) +@ + + +0.83.0.1 +log +@Mise en place su GIT +@ +text +@d5 1 +a5 1 +%define revision %(R="$Revision: 0.83.0.0 $"; RR="${R##: }"; echo ${RR%% ?}) +@ diff --git a/support/README b/support/README new file mode 100644 index 0000000..210ad7a --- /dev/null +++ b/support/README @@ -0,0 +1,131 @@ + + VZGOT + + +Description: + + vzgot is a package to manage linux container. + It is compatible with a vanilla linux kernel (currently 2.6.31.6-162.fc12), + without needing any further kernel adjustment (project mandatory). + + Most of the installation is done using shell script, allowing the + host admin to make local adjustment. + + I was able to have containers (rh7.3, rh8, rh9, fc2 -> fc12,Centos 4.6 ->5.3, + ubuntu-8.04,ubuntu-9.04 ) for a total of 35, up and running on a vanilla FC12 + distribution. + Some old distribution need small adjustment and RPM are included within + the vzgot RPM (src.rpm included). + + Template used by vzgot are the exact same one as used by openvz (this was + project mandatory). + + +Commands: + + Basic commands: + + vzgot boot|shutdown container_name + To boot or shutdown the name container. + To debug your first container: + vzgot -d9 -f -v boot cont_name /bin/bash + + + vzgot create container_name template_tar_filename distribution_name architecture + Takes template_tar_filename and stores it in the vzgot main directory + (/var/lib/vzgot/vzdir). + + vzgot firstboot container_name distribution_name domain_name node_name ip_list + Configure the template to set the host name (node.domain.name), + prepare device definition (/dev/tty, etc..), configure network, etc... + Some specific site configuration allow you to prepare user, group, ssh key, + resolv.conf to be exactly the same on all generated container. + /var/lib/vzgot/etc is where common data are stored. + + vzgot destroy container_name + To get rid of the container directory once and for all (need to + be shutdown first). + + + + Complex commands: + + vzgot.mksrvz nodename.your_domain.name [distribution] [architecture] + It is used to prepare a container (create, firstboot, boot) using + the nodename.your_domain.name resolution to extract IP. + You may need to change the TPL environment variable (within + the script) to fit your own template name. + (ours is TPL=linux-$DISTRIB-$CPUARCH-vzserver.tar.gz). + + vzgot.redoall filename_list_to_redo + This script check for a file /etc/vzgot/'filename_list_to_redo' + and use it to regenerate all set container. + There is a file /etc/vzgot/vzredoall as an example, it is + the list of all the templates we are able to succesfully run now. + (33 altogether). + + + Production command: + + service vzgot start|stop + Classical redhat service start|stop . + This script will start all containers with a file named + /var/lib/vzgot/vzdir/cont_name/status + whose content is "BOOT=ON" + This script will stop all container with a file named + /var/lib/vzgot/vzdir/cont_name/first.pid + + +Package structure: + + /etc/vzgot: directory with the configuration file needed + by the main host to create or manage a container. + + /var/lib/vzgot: application core directory + + /var/lib/vzgot/vzdir: all container storage area, + the directory name is the container name. + + /var/lib/vzgot/vzdir/cont_name: + - rootfs is the container root directory + - console is a file receiving ALL data transmitted + to container /dev/console (/sbin/init boot process) + - first.pid is the file with the /sbin/init + - status, used to boot container, content is + BOOT=ON or BOOT=OFF + + /var/lib/vzgot/RPM: + tree with RPM to be added for some distribution + to properly work(RH7.3 etc...), you can add your + own if you wish. + + /var/lib/vzgot/home: + template directory of common users to be added to + the container during creation. + + /var/lib/vzgot/etc: + - groups, users list of group and users you want to + be added at template creation. + - shadow, crypted password you want to set on + container. + - resolv.conf to be set in the container. + - sudoers to be added to container /etc/sudoers. + + /var/lib/vzgot/cgroup.d: + - cgroup definition, which are duplicated to + container home directory cgroup.d, such + each container can have its own set of cgroup + priviledges. + +Notes: + We are using our own template (the one used with the openvz package), + they are fine tuned to do what we want (be able to use container + to compile package, check bug on distribution configuration). + to make sure you own template can be used we have made a successful + test using standard openvz template centos-5-x86_64-devel.tar.gz + as vzgot feed. + + Please feel free to tweak it. + You are welcome to give me feedback about it. + + jmp AT safe DOT ca diff --git a/support/redhat_init.sh b/support/redhat_init.sh new file mode 100755 index 0000000..b3df561 --- /dev/null +++ b/support/redhat_init.sh @@ -0,0 +1,113 @@ +#!/bin/sh +# +# vzgot This shell script takes care of starting and stopping +# vzgot container with the "ON" status +# +# description: Scan vzgot vdir directory to find out about container +# and start them if requested. +# +# chkconfig: - 98 2 +# description: Startup/shutdown vzgot containers +### BEGIN INIT INFO +# Provides: vzgot +# Required-Start: network +# Required-Stop: +# Default-Start: +# Default-Stop: 0 1 6 +# Short-Description: starting container +### END INIT INFO + + +#basic function +[ -f /etc/rc.d/init.d/functions ] && . /etc/rc.d/init.d/functions + +if [ -f /etc/vzgot/vzgot_config ] ; then + . /etc/vzgot/vzgot_config + fi + +#------------------------------------------------------------------ +vzgotstart() + +{ +echo -n "Vzgot starting" && success || failure +echo +count=0 +for cont in `ls $VZLIB/vzdir` + do + if ! [ -f $VZLIB/vzdir/status ] ; then + . $VZLIB/vzdir/$cont/status + + case "$BOOT" in + "ON" ) + if ! [ -f $VZLIB/vzdir/$cont/first.pid ] ; then + BOOTLOG=$VZLIB/vzdir/$cont/bootlog + date > $BOOTLOG + echo -n "Booting container $cont" + vzgot boot $cont && success || failure + echo + count=`expr $count + 1` + fi + ;; + "*" ) + ;; + esac + fi + done +echo -n "vzgot: $count container started" && success || failure +echo +} + +vzgotstop() + +{ +echo -n "Vzgot stopping" && success || failure +echo +for cont in `ls $VZLIB/vzdir` + do + if [ -f $VZLIB/vzdir/$cont/first.pid ] ; then + echo -n "Halting container $cont" + vzgot shutdown $cont && success || failure + echo + while [ -f /$VZLIB/vzdir/$cont/first.pid ] ; do + sleep 1 + done + fi + done +echo -n "vzgot: all container now down" && success || failure +echo +} + +#------------------------------------------------------------------ +case "$1" in + start) + # Start daemons. + touch /var/lock/subsys/vzgot + vzgotstart + + ;; + + stop) + # Stopping daemons. + vzgotstop + rm -f /var/lock/subsys/vzgot + ;; + + restart) + $0 stop + $0 start + ;; + + reload) + echo "Nothing to do" + ;; + + status) + status $PROG + ;; + *) + echo "Usage: regulus {start|stop|restart|status}" + exit 1 +esac + +exit 0 + diff --git a/support/sauver b/support/sauver new file mode 100755 index 0000000..d81442d --- /dev/null +++ b/support/sauver @@ -0,0 +1,35 @@ +#! /bin/sh +#----------------------------------------------- +MSG=" +Mise en place su GIT +" +#----------------------------------------------- +REV="$Revision: 0.84.0.0 $" +VERS=`echo $REV | cut -d' ' -f2 - ` +NUM=`echo $REV | cut -d' ' -f2 | cut -d'.' -f1,2` +#NXTVER doit etre activer pour un changement de version +#et mis en commentaire apres +NXTVER="0.84" +#----------------------------------------------- +for i in $* + do + LINE=" +#================================================================================= + +" + if ! [ -f RCS/$i,v ]; then + ci -q -r$NUM -f -l -m"Creation $LINE" $i < $i + ci -q -r$VERS -f -l -m"Ratrapage numero de Version" $i + LINE="" + fi + ci -q -f -l -m"$MSG $LINE" $i + #to upgrade a version! + if [ -n "$NXTVER" ] ; then + rcs -q -u $i + co -q -l -p$NUM $i > /dev/null + ci -q -r$NXTVER -f -l -m"upgrade version" $i < $i + ci -q -r$NXTVER.0.0 -f -l -m"Ratrapage numero de Version" $i + fi + echo `rlog -L -l $i | grep vision | grep locked | grep \`id -n -u\` |tr '\t' ' '|cut -d' ' -f2`"---->" $i + done +exit diff --git a/support/tree b/support/tree new file mode 100644 index 0000000..a56e85a --- /dev/null +++ b/support/tree @@ -0,0 +1,133 @@ + + VZGOT + + +Description: + + vzgot is a package to manage linux container. + it is working with a PLAIN linux kernel (currently 2.6.31.6-162.fc12), + without need to make any kernel adjustementm (project mandatory). + + Most of installation is done using shell script, allowing + host admin to make local adjustement. + + I was able to have containers (rh7.3, rh8, rh9, fc2 -> fc12, Centos 4.6 ->5.3) + for a total of 33, up and running on a FC12 plain distribution. + Some old distribution need small adjustement and RPM are included within + the vzgot RPM (src.rpm included). + + Template used by vzgot are the exact same one used with openvz (this was + project mandatory) + + +commands: + + Basic commands: + + vzgot boot|shutdown container_name + To boot or shutdown the name container. + To debug your first container: + vzgot -d9 -f -v boot cont_name /bin/bash + + + vzgot create container_name template_tar_filename distribution_name architecture + Take template_tar_filename and store it in the vzgot main directory + (/var/lib/vzgot/vzdir) + + vzgot firstboot container_name distribution_name domain_name node_name ip_list + Configure the template to set the host name (node.domain.name), + preparing device definition (/dev/tty, etc..), configuring network, etc... + Some specific site configuration allow you to prepare user,group, ssh key, + resolv.conf to be exactly the same for all generated container. + /var/lib/vzgot/etc is where common data are stored. + + vzgot destroy container_name + To get rid of the container directory once for all (need to + be shutdown first. + + + + Complex commands: + + vzgot.mksrvz nodename.your_domain.name [distribution] [architecture] + It used to prepare a container (create,firstboot,boot) using + the nodename.your_domain.name resolution to extract IP. + You may need to change the TPL enviromenet variable (within + the script) to fit your template name of your own. + (ours is TPL=linux-$DISTRIB-$CPUARCH-vzserver.tar.gz). + + vzgot.redoall filename_list_to_redo + This script check for a file /etc/vzgot/'filename_list_to_redo' + and use it to regenerate all set container. + There is a file /etc/vzgot/vzredoall as example, this is + the list of all template we are able to succesfully run now + (33 all together). + + + Production command: + + service vzgot start|stop + Classical redhat service start|stop + this script will start all container with a file named + /var/lib/vzgot/vzdir/cont_name/status + with content to be "BOOT=ON" + this script will stop all container with a file named + /var/lib/vzgot/vzdir/cont_name/first.pid + + + +Notes: + We are using our own template (the one used with the openvz package), + they are fine tuned to do what we want (be able to use container + to compile package, check bug on distribution configuration). + to make sure you own template can be used we have made a successful + test using standard openvz template centos-5-x86_64-devel.tar.gz + as vzgot feed. + + While fully operationnal for us, vzgot need to be improved + on the resources allocation (cgroups) and quota (?), before + to be expose to uncontrolled/adverse production usage. + + + +Package structure: + + /etc/vzgot: directory with configuration file needed + by the main host to create or manage a container. + + /var/lib/vzgot: application core directory + + /var/lib/vzgot/vzdir: all container storage area, + the directory name is the container name. + + /var/lib/vzgot/vzdir/cont_name: + - rootfs is the container root directory + - console is a file receiving ALL data transmitted + to container /dev/console (/sbin/init boot process) + - first.pid is file with the /sbin/init + - status, used to boot container, contens is + BOOT=ON of BOOT=OFF + + /var/lib/vzgot/RPM: + tree with RPM to be added to have some distribution + fully working (RH7.3 etc...), you can add your + own if you like. + + /var/lib/vzgot/home: + template directory to standard user to be added on + container while created. + + /var/lib/vzgot/etc: + - groups,users list of group and users you want to + be added at template creation + - shadow, crypted password you want to set on + container. + - resolv.conf to be set in the container. + - sudoers to be added to container /etc/sudoers. + + + Please feel free to play with it and you are welcome to + give me feed back about it + + jmp AT safe DOT ca + diff --git a/support/vzgot.spec b/support/vzgot.spec new file mode 100644 index 0000000..5c5393b --- /dev/null +++ b/support/vzgot.spec @@ -0,0 +1,145 @@ +#----------------------------------------------------------- +#Fichier des definition des SPEC d'installation +#----------------------------------------------------------- +#to define the revision numer +%define revision %(R="$Revision: 0.84.0.0 $"; RR="${R##: }"; echo ${RR%% ?}) +%define rversion %(echo %{revision} | cut -d'.' -f1-2) +%define rrelease %(echo %{revision}| cut -d'.' -f4) +%define revdate %(R="$Date: 2010/03/06 16:39:08 $"; RR="${R##: }"; echo ${RR%% ?}) +%define sversion %(echo %{revdate} | cut -d' ' -f1 | tr -d '/') +%define ddist %(echo %{?dist}| tr -d '.') +#----------------------------------------------------------- +%{?!mark:%define mark fedora} + +%if "%mark" == "fedora" +%define locmark %{?dist} +%endif + +%if "%mark" == "safe" +%define locmark .%{?dist}.%{mark} +%endif +#----------------------------------------------------------- +Name: vzgot +Summary: An application to drive linux container +Group: System Environment/Daemons +Version: %{rversion}.%{rrelease} +Release: %{?sversion}%{?locmark} +License: GPLv2 +Source: ftp://ftp.safe.ca/pub/srctgz/%{name}-%{version}.tgz +URL: http://www.%{name}.safe.ca/index.html +Vendor: SAFE Inc. +Requires: kernel >= 2.6.24 +Requires: util-linux-ng +Requires: bridge-utils +Requires: /usr/sbin/brctl,/sbin/ip,/bin/ps,/usr/bin/wc +Requires: /sbin/chkconfig +Requires: /bin/chmod,/bin/sed,/bin/sh,/bin/ln +#--------------------------------------------------------------- +buildroot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + + +%description +vzgot is a set of tool to manage linux container +it allow to run a wide range of distribution +(from RH-7.3 to FC12, Centos-4.6 to Centos-5.3) +while using a plain linux kernel (above 2.6.24). + + +%files +#%defattr(0640,root,root,0755) +%doc %{name}-%{version}*.build_date +%doc README Changes QUICK-START +%{_var}/lock/%{name} +%{_var}/lib/%{name}/RPM +%{_var}/lib/%{name}/vzdir +%{_var}/lib/%{name}/etc/ssh +%{_var}/lib/%{name}/home +%{_var}/lib/%{name}/cgroup.d +%{_var}/lib/%{name}/vztemplate +%{_initrddir}/%{name} +%{_usr}/sbin/%{name} +%{_usr}/sbin/%{name}.mksrvz +%{_usr}/sbin/%{name}.redoall +%{_var}/lib/%{name}/shell/%{name}.net +%{_var}/lib/%{name}/shell/%{name}.fboot +%{_var}/lib/%{name}/shell/%{name}.fboot.redhat +%{_var}/lib/%{name}/shell/%{name}.fboot.debian +%{_var}/lib/%{name}/shell/%{name}.open +%{_var}/lib/%{name}/shell/%{name}.close +%{_var}/lib/%{name}/shell/%{name}.start +%{_var}/lib/%{name}/shell/%{name}.create +%{_var}/lib/%{name}/shell/%{name}.destroy + +%config(noreplace) %{_sysconfdir}/%{name}/vzgot_config +%config(noreplace) %{_sysconfdir}/%{name}/vzgot_list +%config(noreplace) %{_var}/lib/%{name}/etc/shadow +%config(noreplace) %{_var}/lib/%{name}/etc/resolv.conf +%config(noreplace) %{_var}/lib/%{name}/etc/groups +%config(noreplace) %{_var}/lib/%{name}/etc/users +%config(noreplace) %{_var}/lib/%{name}/etc/sudoers +%config(noreplace) %{_var}/lib/%{name}/etc/sysconfig/iptables +%config(noreplace) %{_var}/lib/%{name}/etc/snmp/snmpd.conf + +#----------------------------------------------------------- +#This is the RPM install/upgrade/remove directive +#----------------------------------------------------------- +#before install or upgrade +%pre + +#after install or upgrade +%post +if [ "$1" = 1 ]; then + /sbin/chkconfig %{name} on 2>/dev/null || : + #extracting HOST root password to be used as container common password + /bin/chmod 600 %{_var}/lib/%{name}/etc/shadow + /bin/sed 's/#.*//g' /etc/shadow | \ + grep -v '^[[:space:]]*$' | \ + grep root >> %{_var}/lib/%{name}/etc/shadow + #extracting HOST nameserver to be used by container + /bin/sed 's/#.*//g' /etc/resolv.conf \ + >> %{_var}/lib/%{name}/etc/resolv.conf + fi + +#before upgrade or remove +%postun + +#after upgrade or remove +%preun +if [ "$1" = 0 ]; then + %{_initrddir}/%{name} stop 2>/dev/null || : + /sbin/chkconfig --del %{name} 2>/dev/null || : + fi + +#----------------------------------------------------------- +#common part +#----------------------------------------------------------- +%prep + +%setup -q + +%build +%{__rm} -rf %{buildroot} +%{?_smp_mflags:%define _smp_mflags -j `/usr/bin/getconf _NPROCESSORS_ONLN`} +%{__make} -s %{?_smp_mflags} DIST=%{?ddist} prod + +%clean +%{__rm} -rf %{buildroot} + +%install +#main install +%{__rm} -fr %{buildroot} +mkdir -p -m0755 %{buildroot} +%{__make} -s install DESTDIR=%{buildroot} + +%changelog +* Mon Jan 4 2010 Jean-Marc Pigeon 0.71.6-20100104 +- Bug Fix + * In none debug flag, vzgot was not returning echo + from called shell + * Defining a 'FLINUX' env variable within shell script + vzgot.mksrvz to be pass to 'vzgot create' and used by + vzgot.fboot to prepare container with the right + linux family (RedHat,SUSE,...) structure + +* Sun Jan 3 2010 Jean-Marc Pigeon 0.71.3-20100104 + * First release diff --git a/support/vzgot_config b/support/vzgot_config new file mode 100644 index 0000000..2c26e9a --- /dev/null +++ b/support/vzgot_config @@ -0,0 +1,43 @@ +# -*-Shell-script-*- +#---------------------------------------------------- +#this file define common variable needed by vzgot to +#start container. +#====================================================== +#installation main directory +VZLIB=/var/lib/vzgot +#====================================================== +#BRIDGENAME is the bridge interface you have configured +#on your site. +#to configure a bridge on the HOST (the hardware level) +#----------------------------------------------------- +#brctl addbr br0 +#ifconfig br0 You_production_ip_number/mask up +#brctl addif br0 eth0 +#ifconfig eth0 0.0.0.0 +#echo 1 > /proc/sys/net/ipv4/conf/br0/proxy_arp +#----------------------------------------------------- +BRIDGENAME="br0" +#====================================================== +#ETHNAME is the container interface name you want +#to be renamed to, usualy named eth0 +#----------------------------------------------------- +#command used: if link set 'From_pid' name $ETHNAME +ETHNAME="eth0" +#====================================================== +#CGROUP directory +#this the cgroup directory location mounted by command +#mount -t cgroup cgroup /the_directory +#in our default configuration directory is mount on dir "/cgroup" +CGROUP="/cgroup" +#====================================================== +#LVM device +#IF SET, specify you want to use LVM (Logical Volume Management) +#as device to set your virtual +#such setting LVM="vzvol" will make 'vzgot create' to make +#a localdevice named /dev/$LVM/$CONTNAME +#Such YOU must use vgreate to prepare your $LVM Volume group +#setting LVM_SIZE will override the LVM default value set in +#vzgot create script. +#LVM=vzvol +LVM_SIZE=2G +#====================================================== diff --git a/support/vzgot_list b/support/vzgot_list new file mode 100644 index 0000000..efeb9dd --- /dev/null +++ b/support/vzgot_list @@ -0,0 +1,60 @@ + +#This file contain all container list used to compile application +#projects +#This list include all container type successful under vzgot containers +#this file can be used by vzgot.redoall +#to RECREAT ALL container +#----------------------------------------------------------------- +#This file is given as example, we are using it via a cron +#9 4 * * sun root /usr/sbin/vzgot.redoall vzgot_list +#to redo ALL our compilation container system every Sunday +#Distribution name is used as a key to locate the right +#template used by vzgot.create. +#----------------------------------------------------------------- +#container name template_name distribution architecture +#----------------------------------------------------------------- +## default distribution with openVZ template +dflt-ctos-5 centos-5-x86 ovzel5.4 i386 +dflt-fc12 fedora-12-x86_64 ovzfc12 x86_64 +dflt-ubu9.4 ubuntu-9.04-x86 ovzubu9.4 i386 +#----------------------------------------------------------------- +## Successful intsllation with SAFE template +## CENTOS distribution +vz-el4.6-i386 linux-el4.6-i386-vzserver el4.6 i386 +vz-el4.6-x86-64 linux-el4.6-x86_64-vzserver el4.6 x86_64 +vz-el4.7-i386 linux-el4.7-i386-vzserver el4.7 i386 +vz-el4.7-x86-64 linux-el4.7-x86_64-vzserver el4.7 x86_64 +vz-el4.8-i386 linux-el4.8-i386-vzserver el4.8 i386 +vz-el4.8-x86-64 linux-el4.8-x86_64-vzserver el4.8 x86_64 +vz-el5.2-i386 linux-el5.2-i386-vzserver el5.2 i386 +vz-el5.2-x86-64 linux-el5.2-x86_64-vzserver el5.2 x86_64 +vz-el5.3-i386 linux-el5.3-i386-vzserver el5.3 i386 +vz-el5.3-x86-64 linux-el5.3-x86_64-vzserver el5.3 x86_64 +vz-el5.4-i386 linux-el5.4-i386-vzserver el5.4 i386 +vz-el5.4-x86-64 linux-el5.4-x86_64-vzserver el5.4 x86_64 +## Fedora distribution +vz-fc2-i386 linux-fc2-i386-vzserver fc2 i386 +vz-fc3-i386 linux-fc3-i386-vzserver fc3 i386 +vz-fc4-i386 linux-fc4-i386-vzserver fc4 i386 +vz-fc5-i386 linux-fc5-i386-vzserver fc5 i386 +vz-fc6-i386 linux-fc6-i386-vzserver fc6 i386 +vz-fc7-i386 linux-fc7-i386-vzserver fc7 i386 +vz-fc7-x86-64 linux-fc7-x86_64-vzserver fc7 x86_64 +vz-fc8-i386 linux-fc8-i386-vzserver fc8 i386 +vz-fc8-x86-64 linux-fc8-x86_64-vzserver fc8 x86_64 +vz-fc9-i386 linux-fc9-i386-vzserver fc9 i386 +vz-fc9-x86-64 linux-fc9-x86_64-vzserver fc9 x86_64 +vz-fc10-i386 linux-fc10-i386-vzserver fc10 i386 +vz-fc10-x86-64 linux-fc10-x86_64-vzserver fc10 x86_64 +vz-fc11-i386 linux-fc11-i386-vzserver fc11 i386 +vz-fc11-x86-64 linux-fc11-x86_64-vzserver fc11 x86_64 +vz-fc12-i386 linux-fc12-i386-vzserver fc12 i386 +vz-fc12-x86-64 linux-fc12-x86_64-vzserver fc12 x86_64 +## RedHat original distribution +#The venerable ancestor! +vz-rh7.3-i386 linux-rh7.3-i386-vzserver rh7.3 i386 +vz-rh8.0-i386 linux-rh8.0-i386-vzserver rh8.0 i386 +vz-rh9-i386 linux-rh9-i386-vzserver rh9 i386 +vz-rhel4-i386 linux-rhel4-i386-vzserver rhel4 i386 +## Ubuntu distribution (VZ Template) +vz-ubu8.4-i386 ubuntu-8.04-x86 ubu8.4 i386 diff --git a/support/vzredoall b/support/vzredoall new file mode 100644 index 0000000..86c775b --- /dev/null +++ b/support/vzredoall @@ -0,0 +1,54 @@ +#----------------------------------------------------------------- +#This file contain all container list used to compile application +#projects +#This list include all container type successful under vzgot containers +#this file can be used by vzgot.redoall +#to RECREAT ALL container +#----------------------------------------------------------------- +#This file is given as example, we are using it via a cron +#9 4 * * sun root /usr/sbin/vzgot.redoall vzredoall +#to redo ALL our compilation container system every Sunday +#Distribution name is used as a key to locate the right +#template used by vzgot.create. +#----------------------------------------------------------------- +#container name distribution architecture +#----------------------------------------------------------------- +## CENTOS distribution +vz-el4.6-i386 el4.6 i386 +vz-el4.6-x86-64 el4.6 x86_64 +vz-el4.7-i386 el4.7 i386 +vz-el4.7-x86-64 el4.7 x86_64 +vz-el4.8-i386 el4.8 i386 +vz-el4.8-x86-64 el4.8 x86_64 +vz-el5.2-i386 el5.2 i386 +vz-el5.2-x86-64 el5.2 x86_64 +vz-el5.3-i386 el5.3 i386 +vz-el5.3-x86-64 el5.3 x86_64 +vz-el5.4-i386 el5.4 i386 +vz-el5.4-x86-64 el5.4 x86_64 +## Fedora distribution +vz-fc2-i386 fc2 i386 +vz-fc3-i386 fc3 i386 +vz-fc4-i386 fc4 i386 +vz-fc5-i386 fc5 i386 +vz-fc6-i386 fc6 i386 +vz-fc7-i386 fc7 i386 +vz-fc7-x86-64 fc7 x86_64 +vz-fc8-i386 fc8 i386 +vz-fc8-x86-64 fc8 x86_64 +vz-fc9-i386 fc9 i386 +vz-fc9-x86-64 fc9 x86_64 +vz-fc10-i386 fc10 i386 +vz-fc10-x86-64 fc10 x86_64 +vz-fc11-i386 fc11 i386 +vz-fc11-x86-64 fc11 x86_64 +vz-fc12-i386 fc12 i386 +vz-fc12-x86-64 fc12 x86_64 +## RedHat original distribution +vz-rh7.3-i386 rh7.3 #The venerable ancestor! +vz-rh8.0-i386 rh8.0 +vz-rh9-i386 rh9 +vz-rhel4-i386 rhel4 +## Ubuntu distribution +vz-ubu8.4-i386 ubu8.4 +vz-ubu9.4-i386 ubu9.4 diff --git a/support/worklogs b/support/worklogs new file mode 100644 index 0000000..e69de29