summaryrefslogtreecommitdiff
path: root/config/chroot_local-includes/lib/live
diff options
context:
space:
mode:
authorAndreas Loibl <andreas@andreas-loibl.de>2012-02-27 04:08:23 +0100
committerAndreas Loibl <andreas@andreas-loibl.de>2012-02-27 05:34:38 +0100
commitf2c9544e50c8a9774a2fa7d86bf2ee59761a92e7 (patch)
tree71ad964d475fbf6336060fd4d7488aea9d5d8add /config/chroot_local-includes/lib/live
parent7331f854ed32d4b079314c9b5418a79ae793b3e7 (diff)
downloadkanotix-f2c9544e50c8a9774a2fa7d86bf2ee59761a92e7.zip
kanotix-f2c9544e50c8a9774a2fa7d86bf2ee59761a92e7.tar.gz
added "enable persistent" feature
Diffstat (limited to 'config/chroot_local-includes/lib/live')
-rw-r--r--config/chroot_local-includes/lib/live/config/900-enable-persistent34
1 files changed, 34 insertions, 0 deletions
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
+