From 486b148a08e14ce9868e8d5727dfe66e547c2ec4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Marczykowski-G=C3=B3recki?= Date: Wed, 21 May 2014 20:21:15 +0200 Subject: [PATCH] Configure only installed programs --- network/show-hide-nm-applet.sh | 2 ++ rpm_spec/core-vm.spec | 25 +++++++++++++++---------- 2 files changed, 17 insertions(+), 10 deletions(-) diff --git a/network/show-hide-nm-applet.sh b/network/show-hide-nm-applet.sh index 80257b0..7710f1f 100644 --- a/network/show-hide-nm-applet.sh +++ b/network/show-hide-nm-applet.sh @@ -1,5 +1,7 @@ #!/bin/sh +type nm-applet &> /dev/null || exit 0 + # Hide nm-applet when network-manager is disabled nm_enabled=false [ -f /var/run/qubes-service/network-manager ] && nm_enabled=true diff --git a/rpm_spec/core-vm.spec b/rpm_spec/core-vm.spec index 3e64a36..bb9fdbb 100644 --- a/rpm_spec/core-vm.spec +++ b/rpm_spec/core-vm.spec @@ -48,6 +48,7 @@ Requires: net-tools Requires: nautilus-actions Requires: qubes-core-vm-kernel-placeholder Requires: qubes-utils +Requires: initscripts %if %{fedora} >= 20 # gpk-update-viewer required by qubes-manager Requires: gnome-packagekit-updater @@ -173,11 +174,6 @@ echo 'OnlyShowIn=GNOME;QUBES;' >> /etc/xdg/autostart/nm-applet.desktop || : echo 'OnlyShowIn=GNOME;NetVM;' >> /etc/xdg/autostart/nm-applet.desktop || : %endif -# Enable autostart of notification-daemon when installed -if [ ! -e /etc/xdg/autostart/notification-daemon.desktop ]; then - ln -s /usr/share/applications/notification-daemon.desktop /etc/xdg/autostart/ -fi - usermod -p '' root usermod -L user @@ -224,11 +220,6 @@ if [ -e /etc/init/serial.conf ] && ! [ -f /var/lib/qubes/serial.orig ] ; then cp /etc/init/serial.conf /var/lib/qubes/serial.orig fi -#echo "--> Disabling SELinux..." -sed -e s/^SELINUX=.*$/SELINUX=disabled/ /etc/selinux/config.processed -mv /etc/selinux/config.processed /etc/selinux/config -setenforce 0 2>/dev/null - # Remove most of the udev scripts to speed up the VM boot time # Just leave the xen* scripts, that are needed if this VM was # ever used as a net backend (e.g. as a VPN domain in the future) @@ -256,6 +247,20 @@ mkdir -p /rw #mv /etc/sysconfig/network-scripts/ifcfg-eth0 /etc/sysconfig/network-scripts/ifcfg-eth0.orig #grep -v HWADDR /etc/sysconfig/network-scripts/ifcfg-eth0.orig > /etc/sysconfig/network-scripts/ifcfg-eth0 +%triggerin -- notification-daemon +# Enable autostart of notification-daemon when installed +if [ ! -e /etc/xdg/autostart/notification-daemon.desktop ]; then + ln -s /usr/share/applications/notification-daemon.desktop /etc/xdg/autostart/ +fi +exit 0 + +%triggerin -- selinux-policy +#echo "--> Disabling SELinux..." +sed -e s/^SELINUX=.*$/SELINUX=disabled/ /etc/selinux/config.processed +mv /etc/selinux/config.processed /etc/selinux/config +setenforce 0 2>/dev/null +exit 0 + %preun if [ "$1" = 0 ] ; then # no more packages left