From c17623361693f47f815665209b85a12c2a7e06a2 Mon Sep 17 00:00:00 2001 From: axk4545 Date: Thu, 20 Apr 2017 12:25:07 -0400 Subject: [PATCH] add selinux and sudo check --- ci-build.sh | 2 ++ make-iso.sh | 8 ++++++++ 2 files changed, 10 insertions(+) diff --git a/ci-build.sh b/ci-build.sh index e328cef..0fc21cd 100644 --- a/ci-build.sh +++ b/ci-build.sh @@ -14,6 +14,7 @@ then echo "Please run this script as root (sudo $@$0)." exit fi +setenforce 0 rm -rf tigeros.ks wget -O tigeros.ks https://raw.githubusercontent.com/RITlug/TigerOS/master/tigeros.ks livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot @@ -23,3 +24,4 @@ cd /srv/isos sha512sum *.iso > CHECKSUM512 cd /home/build rm -rf anaconda/ *.log +setenforce 1 diff --git a/make-iso.sh b/make-iso.sh index cec0cd3..2dbe38b 100644 --- a/make-iso.sh +++ b/make-iso.sh @@ -12,12 +12,20 @@ green=`tput setaf 2` reset=`tput sgr0` echo "${green}Welcome to the TigerOS build script${reset}" +# Check that the current user is root +if [ $EUID != 0 ] +then + echo "Please run this script as root (sudo $@$0)." + exit +fi #mock -r fedora-25-x86_64 --init #mock -r fedora-25-x86_64 --copyin tigeros.ks ./tigeros.ks #mock -r fedora-25-x86_64 --install lorax-lmc-novirt git vim-minimal pykickstart svn #mock -r fedora-25-x86_64 --chroot "svn export https://github.com/RITlug/TigerOS/trunk/scripts/" echo "${green}Beginning build process${reset}" +setenforce 0 livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot #mock -r fedora-25-x86_64 --chroot "livemedia-creator --ks tigeros.ks --no-virt --resultdir /var/lmc --project TigerOS-Live --make-iso --volid TigerOS --iso-only --iso-name TigerOS.iso --releasever 25 --title TigerOS-live --macboot" #mock -r fedora-25-x86_64 --copyout /var/lmc/TigerOS.iso TigerOS.iso echo "${green}ISO saved to $(pwd)/TigerOS.iso${reset}" +setenforce 1