diff options
author | Holger Paradies <retabell@gmx.de> | 2023-10-22 09:49:44 +0200 |
---|---|---|
committer | Holger Paradies <retabell@gmx.de> | 2023-10-22 09:49:44 +0200 |
commit | 6bb87c8ad72be6c6cabcdf16c3cb4c1f339a8743 (patch) | |
tree | 57892d67c4210d74fd08f4eadd78606bc208cb00 /kanotix/9000-enable-persistent | |
parent | a6dcaa317c4e434f3defe43de39312c51e40bd4e (diff) | |
download | acritoxinstaller-6bb87c8ad72be6c6cabcdf16c3cb4c1f339a8743.zip acritoxinstaller-6bb87c8ad72be6c6cabcdf16c3cb4c1f339a8743.tar.gz |
Change enable-persistent config
Diffstat (limited to 'kanotix/9000-enable-persistent')
-rwxr-xr-x | kanotix/9000-enable-persistent | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/kanotix/9000-enable-persistent b/kanotix/9000-enable-persistent index efd21e3..c8f0b31 100755 --- a/kanotix/9000-enable-persistent +++ b/kanotix/9000-enable-persistent @@ -20,13 +20,17 @@ then return fi -case "$(awk '{if($2=="/live/image"||$2=="/lib/live/mount/medium"||$2=="/run/live/medium"){print $1;}}' /proc/mounts)" in +HAVE_PERS_CMDLINE="$(grep -F persistence /proc/cmdline)" +if [ -n "$HAVE_PERS_CMDLINE" ]; then + HAVE_PERS_CMDLINE="persistence" +fi + +ISO_DEVICE="$(awk '{if($2=="/live/image"||$2=="/lib/live/mount/medium"||$2=="/run/live/medium"){print $1;}}' /proc/mounts)" + +case "$ISO_DEVICE" in /dev/sd*) - if [ -d "/run/live/persistence" ]; then - rm -f /home/${LIVE_USERNAME}/Desktop/enable_persistent.desktop - fi - case "$( ls /grub.cmdline 2>/dev/null)" in - /grub.cmdline) + case "$HAVE_PERS_CMDLINE" in + persistence) rm -f /home/${LIVE_USERNAME}/Desktop/enable_persistent.desktop ;; *) |