From 2de02b7a6c10a5876ba46df3fe1c1dfdf787483f Mon Sep 17 00:00:00 2001 From: Joanna Rutkowska Date: Wed, 14 Sep 2011 19:30:29 +0200 Subject: [PATCH] vm: update symlinks in Nautilus Scripts menu This is important for older templates that got upgraded to new core packages, which renamed some of the tools by removing the '2' suffix. --- common/qubes_core | 8 ++++++++ rpm_spec/core-appvm.spec | 1 + 2 files changed, 9 insertions(+) diff --git a/common/qubes_core b/common/qubes_core index ef4ed0df..9c972ead 100755 --- a/common/qubes_core +++ b/common/qubes_core @@ -64,6 +64,14 @@ start() su user -c 'touch /home/user/.gnome2/nautilus-scripts/.scripts_created' fi + if ! [ -f /home/user/.gnome2/nautilus-scripts/.scripts_created2 ] ; then + # as we have recently renamed tools, the symlinks would need to be fixed for older templates + su user -c 'ln -sf /usr/lib/qubes/qvm-copy-to-vm.gnome /home/user/.gnome2/nautilus-scripts/"Copy to other AppVM"' + su user -c 'ln -sf /usr/bin/qvm-open-in-dvm /home/user/.gnome2/nautilus-scripts/"Open in DisposableVM"' + su user -c 'touch /home/user/.gnome2/nautilus-scripts/.scripts_created2' + fi + + success echo "" diff --git a/rpm_spec/core-appvm.spec b/rpm_spec/core-appvm.spec index 837b3530..51972a84 100644 --- a/rpm_spec/core-appvm.spec +++ b/rpm_spec/core-appvm.spec @@ -59,6 +59,7 @@ su user -c 'mkdir -p /home/user/.gnome2/nautilus-scripts' su user -c 'ln -s /usr/lib/qubes/qvm-copy-to-vm.gnome /home/user/.gnome2/nautilus-scripts/"Copy to other AppVM"' su user -c 'ln -s /usr/bin/qvm-open-in-dvm /home/user/.gnome2/nautilus-scripts/"Open in DisposableVM"' su user -c 'touch /home/user/.gnome2/nautilus-scripts/.scripts_created' +su user -c 'touch /home/user/.gnome2/nautilus-scripts/.scripts_created2' mkdir -p $RPM_BUILD_ROOT/var/lib/qubes