check_distro_commit --print;
fi
elif [ "$1" ] && [ "$1" = "--upgrade" ]; then
-
+ echo -n "Mounting iso image...";
+ sudo mount $2 /mnt > /dev/null 2>&1;
+ if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi
+ part=$(sudo blkid | grep 'LABEL="immudex"' | awk '{printf $1}' | cut -d ":" -f 1);
+ mountPointList=$(sudo mount | grep "$part" | awk '{printf $3" "}');
+ for mountPoint in $mountPointList; do
+ echo -n "Unlocking $mountPoint ...";
+ sudo mount $part $mountPoint -o remount,rw > /dev/null 2>&1;
+ if [ $? -eq 0 ]; then
+ echo -e "[ ${GREEN}OK${ENDCOLOR} ]";
+ else
+ echo -e "[ ${RED}FAIL${ENDCOLOR} ]";
+ fi
+ done
+ echo "Copying immudex files to the disk...";
+ sudo cp -vv /mnt/live/* ${mountPoint}/live;
+ if [ $? -eq 0 ]; then
+ echo -e "Copying immudex files to the disk...[ ${GREEN}OK${ENDCOLOR} ]";
+ else
+ echo -e "Copying immudex files to the disk...[ ${RED}FAIL${ENDCOLOR} ]";
+ fi
else
help;
exit 1;
+ fi
else
help;
exit 1;