elif echo $filename | grep -q 'immudex-niko'; then
branch="immudex";
branchAltName="niko"
+ elif echo $filename | grep -q 'immudex-lhe'; then
+ branch="immudex-lhe";
+ branchAltName="lhe";
else
branch="immudex";
branchAltName="stable";
fi
echo "-== Starting immudex_rebuildenv $(date) ==-" >> immudex_rebuildenv.log;
echo -n "Creating necessary directory structure...";
- mkdir -pv build/${branchAltName}/${branch}/${arch}/{chroot,staging,tmp} >> immudex_rebuildenv.log 2>&1;
+ mkdir -pv build/${branchAltName}/${branch}/${arch}/{chroot,staging} >> immudex_rebuildenv.log 2>&1;
if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
rootPath="build/${branchAltName}";
- echo -n "Fetching immudex_build script...";
- wget https://github.com/xf0r3m/${branch}/raw/main/immudex_build -O build/${branchAltName}/immudex_build >> immudex_rebuildenv.log 2>&1;
- if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
+ #echo -n "Fetching immudex_build script...";
+ #wget https://github.com/xf0r3m/${branch}/raw/main/immudex_build -O build/${branchAltName}/immudex_build >> immudex_rebuildenv.log 2>&1;
+ #if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
- echo -n "Setting execution permissions for immudex_build script..."
- chmod +x build/${branchAltName}/immudex_build;
- if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
+ #echo -n "Setting execution permissions for immudex_build script..."
+ #chmod +x build/${branchAltName}/immudex_build;
+ #if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
echo -n "Creating /tmp/iso directory...";
sudo rmdir -v /tmp/iso >> immudex_rebuildenv.log 2>&1;
if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
- echo -n "Creating grub-standalone.cfg file...";
- cat > ${rootPath}/${branch}/${arch}/tmp/grub-standalone.cfg <<EOF
-search --set=root --file /DEBIAN
-set prefix=($root)/boot/grub
-configfile /boot/grub/grub.cfg
-EOF
- if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
+ #echo -n "Creating grub-standalone.cfg file...";
+ #cat > ${rootPath}/${branch}/${arch}/tmp/grub-standalone.cfg <<EOF
+#search --set=root --file /DEBIAN
+#set prefix=($root)/boot/grub
+#configfile /boot/grub/grub.cfg
+#EOF
+ #if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
- echo "-== Print grub-standalone.cfg $(date) ==-" >> immudex_rebuildenv.log;
- cat ${rootPath}/${branch}/${arch}/tmp/grub-standalone.cfg >> immudex_rebuildenv.log 2>&1;
- echo "-== End Print ==-" >> immudex_rebuildenv.log;
+ #echo "-== Print grub-standalone.cfg $(date) ==-" >> immudex_rebuildenv.log;
+ #cat ${rootPath}/${branch}/${arch}/tmp/grub-standalone.cfg >> immudex_rebuildenv.log 2>&1;
+ #echo "-== End Print ==-" >> immudex_rebuildenv.log;
echo -n "Unpacking squashfs archive...";
sudo unsquashfs -f -d ${rootPath}/${branch}/${arch}/chroot ${rootPath}/${branch}/${arch}/staging/live/filesystem.squashfs >> immudex_rebuildenv.log 2>&1;