From fffb0da5a456282e229e959cf1dae0c466833dab Mon Sep 17 00:00:00 2001 From: xf0r3m Date: Thu, 27 Jul 2023 19:39:47 +0200 Subject: [PATCH] Dostosowanie skryptu 'immudex_rebuildenv' do immudex-lhe --- immudex_rebuildenv | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/immudex_rebuildenv b/immudex_rebuildenv index dd11d23..1dfaf3b 100755 --- a/immudex_rebuildenv +++ b/immudex_rebuildenv @@ -16,6 +16,9 @@ if [ "$1" ]; then 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"; @@ -28,17 +31,17 @@ if [ "$1" ]; then 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..."; @@ -60,17 +63,17 @@ if [ "$1" ]; then 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 < ${rootPath}/${branch}/${arch}/tmp/grub-standalone.cfg <> 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; -- 2.39.5