summaryrefslogtreecommitdiff
path: root/libvasile
diff options
context:
space:
mode:
authorV3n3RiX <venerix@rogentos.ro>2015-08-30 09:21:16 +0100
committerV3n3RiX <venerix@rogentos.ro>2015-08-30 09:21:16 +0100
commit92b62f115b2634086483b5bbf7ded04615814c2f (patch)
treed5d24484be5b5f6e28af568ee114dd53567cff2d /libvasile
parent34ba1e37e44f7b7af2f1243dc9dc75a6a9c6ecdb (diff)
move common functions into libvasile
Diffstat (limited to 'libvasile')
-rwxr-xr-xlibvasile23
1 files changed, 23 insertions, 0 deletions
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
+}