From 92b62f115b2634086483b5bbf7ded04615814c2f Mon Sep 17 00:00:00 2001 From: V3n3RiX Date: Sun, 30 Aug 2015 09:21:16 +0100 Subject: move common functions into libvasile --- build32 | 23 ----------------------- build64 | 23 ----------------------- libvasile | 23 +++++++++++++++++++++++ 3 files changed, 23 insertions(+), 46 deletions(-) diff --git a/build32 b/build32 index e7e4859..01939de 100755 --- a/build32 +++ b/build32 @@ -38,29 +38,6 @@ envkogaionstart () { mount -t tmpfs -o nosuid,nodev,noexec none "$overlaydir"/tmp } -envkogaionstop () { - # umount squashfs + overlayfs chroot - umount -l "$overlaydir"/proc > /dev/null 2>&1 - umount -l "$overlaydir"/sys > /dev/null 2>&1 - umount -l "$overlaydir"/dev/pts > /dev/null 2>&1 - umount -l "$overlaydir"/dev/shm > /dev/null 2>&1 - umount -l "$overlaydir"/dev > /dev/null 2>&1 - umount -l "$overlaydir"/tmp > /dev/null 2>&1 - umount -l "$overlaydir"/usr/portage/packages > /dev/null 2>&1 - umount -l "$overlaydir"/mnt > /dev/null 2>&1 - umount -l "$overlaydir" > /dev/null 2>&1 - umount -l "$rodir" > /dev/null 2>&1 -} - -envcheckroot () { - if [[ "$(whoami)" != root ]] ; then - echo "" - echo "You're not root?...No cookies for you, go away !!!" - echo "" - exit 1 - fi -} - envkogaionsquashfsintegrity () { # our bare metal buildserver is x86_64 but we want to build 32bit packages as well # run this script with linux32 to fool it we run i686 and to build 32bit packages diff --git a/build64 b/build64 index fd83ef7..cbff47d 100755 --- a/build64 +++ b/build64 @@ -38,29 +38,6 @@ envkogaionstart () { mount -t tmpfs -o nosuid,nodev,noexec none "$overlaydir"/tmp } -envkogaionstop () { - # umount squashfs + overlayfs chroot - umount -l "$overlaydir"/proc > /dev/null 2>&1 - umount -l "$overlaydir"/sys > /dev/null 2>&1 - umount -l "$overlaydir"/dev/pts > /dev/null 2>&1 - umount -l "$overlaydir"/dev/shm > /dev/null 2>&1 - umount -l "$overlaydir"/dev > /dev/null 2>&1 - umount -l "$overlaydir"/tmp > /dev/null 2>&1 - umount -l "$overlaydir"/usr/portage/packages > /dev/null 2>&1 - umount -l "$overlaydir"/mnt > /dev/null 2>&1 - umount -l "$overlaydir" > /dev/null 2>&1 - umount -l "$rodir" > /dev/null 2>&1 -} - -envcheckroot () { - if [[ "$(whoami)" != root ]] ; then - echo "" - echo "You're not root?...No cookies for you, go away !!!" - echo "" - exit 1 - fi -} - envkogaionsquashfsintegrity () { # our bare metal buildserver is x86_64 but we want to build 32bit packages as well # run this script with linux32 to fool it we run i686 and to build 32bit packages diff --git a/libvasile b/libvasile index 7f9dc51..1d6a999 100755 --- a/libvasile +++ b/libvasile @@ -27,3 +27,26 @@ export local sqfsrootx64md5=""$sqfsrootx64".md5" # env make.conf variables export local envkogaionmakeconfx86="ln -sf /opt/build/conf/intel/portage/make.conf.x86 /etc/portage/make.conf" export local envkogaionmakeconfx64="ln -sf /opt/build/conf/intel/portage/make.conf.amd64 /etc/portage/make.conf" + +envcheckroot () { + if [[ "$(whoami)" != root ]] ; then + echo "" + echo "You're not root?...No cookies for you, go away !!!" + echo "" + exit 1 + fi +} + +envkogaionstop () { + # umount squashfs + overlayfs chroot + umount -l "$overlaydir"/proc > /dev/null 2>&1 + umount -l "$overlaydir"/sys > /dev/null 2>&1 + umount -l "$overlaydir"/dev/pts > /dev/null 2>&1 + umount -l "$overlaydir"/dev/shm > /dev/null 2>&1 + umount -l "$overlaydir"/dev > /dev/null 2>&1 + umount -l "$overlaydir"/tmp > /dev/null 2>&1 + umount -l "$overlaydir"/usr/portage/packages > /dev/null 2>&1 + umount -l "$overlaydir"/mnt > /dev/null 2>&1 + umount -l "$overlaydir" > /dev/null 2>&1 + umount -l "$rodir" > /dev/null 2>&1 +} -- cgit v1.2.3