diff options
author | Andreas Loibl <andreas@andreas-loibl.de> | 2012-02-27 04:08:23 +0100 |
---|---|---|
committer | Andreas Loibl <andreas@andreas-loibl.de> | 2012-02-27 05:34:38 +0100 |
commit | f2c9544e50c8a9774a2fa7d86bf2ee59761a92e7 (patch) | |
tree | 71ad964d475fbf6336060fd4d7488aea9d5d8add | |
parent | 7331f854ed32d4b079314c9b5418a79ae793b3e7 (diff) | |
download | kanotix-f2c9544e50c8a9774a2fa7d86bf2ee59761a92e7.zip kanotix-f2c9544e50c8a9774a2fa7d86bf2ee59761a92e7.tar.gz |
added "enable persistent" feature
-rwxr-xr-x | auto/config | 1 | ||||
-rw-r--r-- | config/binary_grub/grub.cfg | 21 | ||||
-rw-r--r-- | config/chroot_local-includes/lib/live/config/900-enable-persistent | 34 | ||||
-rw-r--r-- | scripts.urls | 2 |
4 files changed, 57 insertions, 1 deletions
diff --git a/auto/config b/auto/config index 64133b5..2eda1e3 100755 --- a/auto/config +++ b/auto/config @@ -81,5 +81,6 @@ lb config noauto --repositories "$LB_REPOSITORIES" mkdir -p config/chroot_local-includes/usr/local/bin grep -oe '^[^ #]*' scripts.urls | wget -i- -N -q -P config/chroot_local-includes/usr/local/bin chmod 755 config/chroot_local-includes/usr/local/bin/*.sh +chmod 755 config/chroot_local-includes/usr/local/bin/*.bash exit 1 diff --git a/config/binary_grub/grub.cfg b/config/binary_grub/grub.cfg index 3cd4f20..902c01e 100644 --- a/config/binary_grub/grub.cfg +++ b/config/binary_grub/grub.cfg @@ -28,6 +28,27 @@ else set menu_color_highlight=white/blue fi +insmod part_msdos +insmod btrfs +if search --label --set liverw --no-floppy live-rw ; then + if test -e (${liverw})/grub.cmdline ; then + source (${liverw})/grub.cmdline + menuentry 'Start Kanotix (persistent)' --class kanotix64 --class gnu-linux --class gnu --class os { + echo 'Loading Linux ...' + linux /live/vmlinuz ${persistent_cmdline} + echo 'Loading initial ramdisk ...' + initrd /live/initrd.img + } + else + menuentry 'Start Kanotix (persistent)' --class kanotix64 --class gnu-linux --class gnu --class os { + echo 'Loading Linux ...' + linux /live/vmlinuz ${boot_en} quiet splash persistent + echo 'Loading initial ramdisk ...' + initrd /live/initrd.img + } + fi +fi + menuentry 'Start Kanotix DE' --class kanotix64 --class gnu-linux --class gnu --class os { echo 'Loading Linux ...' linux /live/vmlinuz ${boot_de} quiet splash diff --git a/config/chroot_local-includes/lib/live/config/900-enable-persistent b/config/chroot_local-includes/lib/live/config/900-enable-persistent new file mode 100644 index 0000000..0d424e2 --- /dev/null +++ b/config/chroot_local-includes/lib/live/config/900-enable-persistent @@ -0,0 +1,34 @@ +#!/bin/sh +# "enable persistent" desktop-icon + +case "$(awk '{if($2=="/live/image"){print $1;}}' /proc/mounts)" in +/dev/sd*) + case "$(awk '{if($2=="/live/cow"){print $1;}}' /proc/mounts)" in + /dev/sd*) + rm -f /home/${LIVE_USERNAME}/Desktop/enable_persistent.desktop + ;; + *) + sudo -u "${LIVE_USERNAME}" sh -c "mkdir -p /home/${LIVE_USERNAME}/Desktop; cat > /home/${LIVE_USERNAME}/Desktop/enable_persistent.desktop" <<"EOF" +[Desktop Entry] +Comment[de]=Diesen Live-USB-Stick persistent machen, d.h. alle Änderungen werden auf dem Stick gespeichert. +Comment=Make this Live-USB-Stick persistent, i.e. all changes will be saved to the stick. +Exec=/usr/local/bin/enable_persistent_live.bash +Icon=acritoxinstaller +MimeType= +Name[de]=»persistent« aktivieren +Name=enable »persistent« +StartupNotify=true +Terminal=false +TerminalOptions= +Type=Application +EOF + ;; + esac + ;; +*) + rm -f /home/${LIVE_USERNAME}/Desktop/enable_persistent.desktop + ;; +esac + +exit 0 + diff --git a/scripts.urls b/scripts.urls index 6dd0813..8c9627a 100644 --- a/scripts.urls +++ b/scripts.urls @@ -4,4 +4,4 @@ http://kanotix.com/files/fix/update-scripts-kanotix.sh http://kanotix.com/files/install-nvidia-debian.sh http://kanotix.com/files/install-fglrx-debian.sh http://kanotix.com/files/install-flash-local.sh - +http://kanotix.acritox.com/files/enable_persistent_live.bash |