From 8689368a112cc48eb2f8067c3f70a64efff9a628 Mon Sep 17 00:00:00 2001 From: Marek Marczykowski Date: Mon, 6 Feb 2012 19:07:13 +0100 Subject: [PATCH] vm/mimeopen: merge user defaults with system one (#423) --- vm-init.d/qubes_core | 5 ++++- vm-systemd/misc-post-stop.sh | 5 ++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/vm-init.d/qubes_core b/vm-init.d/qubes_core index 450e68b6..c3accd92 100755 --- a/vm-init.d/qubes_core +++ b/vm-init.d/qubes_core @@ -97,7 +97,10 @@ start() stop() { su -c 'mkdir -p /home_volatile/user/.local/share/applications' user - su -c 'cp -a /home/user/.local/share/applications/defaults.list /home_volatile/user/.local/share/applications/' user + su -c 'cp -a /usr/share/applications/defaults.list /home_volatile/user/.local/share/applications/' user + if [ -r '/home/user/.local/share/applications/defaults.list' ]; then + su -c 'cat /home/user/.local/share/applications/defaults.list >> /home_volatile/user/.local/share/applications/defaults.list' user + fi return 0 } diff --git a/vm-systemd/misc-post-stop.sh b/vm-systemd/misc-post-stop.sh index a34346a4..399a41f9 100755 --- a/vm-systemd/misc-post-stop.sh +++ b/vm-systemd/misc-post-stop.sh @@ -3,6 +3,9 @@ # Save default applications for DispVM su -c 'mkdir -p /home_volatile/user/.local/share/applications' user -su -c 'cp -a /home/user/.local/share/applications/defaults.list /home_volatile/user/.local/share/applications/' user +su -c 'cp -a /usr/share/applications/defaults.list /home_volatile/user/.local/share/applications/' user +if [ -r '/home/user/.local/share/applications/defaults.list' ]; then + su -c 'cat /home/user/.local/share/applications/defaults.list >> /home_volatile/user/.local/share/applications/defaults.list' user +fi exit 0