2012-01-10 12:10:16 +01:00
|
|
|
#!/bin/sh
|
|
|
|
|
2014-09-27 01:52:19 +02:00
|
|
|
if [ -f /var/run/qubes-service/yum-proxy-setup -o -f /var/run/qubes-service/updates-proxy-setup ]; then
|
2014-09-30 00:36:53 +02:00
|
|
|
if [ -d /etc/apt/apt.conf.d ]; then
|
2014-10-24 00:45:39 +02:00
|
|
|
echo 'Acquire::http::Proxy "http://10.137.255.254:8082/";' >> /etc/apt/apt.conf.d/01qubes-proxy
|
2014-09-30 00:36:53 +02:00
|
|
|
fi
|
|
|
|
if [ -d /etc/yum.conf.d ]; then
|
|
|
|
echo proxy=http://10.137.255.254:8082/ > /etc/yum.conf.d/qubes-proxy.conf
|
|
|
|
fi
|
2012-05-31 02:37:53 +02:00
|
|
|
else
|
2014-09-30 00:36:53 +02:00
|
|
|
if [ -d /etc/apt/apt.conf.d ]; then
|
|
|
|
rm -f /etc/apt/apt.conf.d/01qubes-proxy
|
|
|
|
fi
|
|
|
|
if [ -d /etc/yum.conf.d ]; then
|
|
|
|
echo > /etc/yum.conf.d/qubes-proxy.conf
|
|
|
|
fi
|
2012-05-31 02:37:53 +02:00
|
|
|
fi
|
|
|
|
|
2012-01-10 12:10:16 +01:00
|
|
|
# Set IP address again (besides action in udev rules); this is needed by
|
2013-03-14 04:23:32 +01:00
|
|
|
# DispVM (to override DispVM-template IP) and in case when qubes-ip was
|
2012-01-10 12:10:16 +01:00
|
|
|
# called by udev before loading evtchn kernel module - in which case
|
2013-06-07 05:20:55 +02:00
|
|
|
# qubesdb-read fails
|
2013-03-13 02:26:40 +01:00
|
|
|
INTERFACE=eth0 /usr/lib/qubes/setup-ip
|
2012-01-10 12:10:16 +01:00
|
|
|
|
|
|
|
[ -x /rw/config/rc.local ] && /rw/config/rc.local
|
|
|
|
|
|
|
|
# Start services which haven't own proper systemd unit:
|
|
|
|
|
|
|
|
# Start AppVM specific services
|
|
|
|
if [ ! -f /etc/systemd/system/cups.service ]; then
|
|
|
|
if [ -f /var/run/qubes-service/cups ]; then
|
2014-10-19 04:11:15 +02:00
|
|
|
/usr/sbin/service cups start
|
2012-01-10 12:10:16 +01:00
|
|
|
# Allow also notification icon
|
|
|
|
sed -i -e '/^NotShowIn=.*QUBES/s/;QUBES//' /etc/xdg/autostart/print-applet.desktop
|
|
|
|
else
|
|
|
|
# Disable notification icon
|
2014-11-30 16:43:11 +01:00
|
|
|
sed -i -e '/QUBES/!s/^NotShowIn=\(.*\)/NotShowIn=QUBES;\1/' /etc/xdg/autostart/print-applet.desktop
|
2012-01-10 12:10:16 +01:00
|
|
|
fi
|
|
|
|
fi
|
2014-05-30 22:44:50 +02:00
|
|
|
if [ -f /var/run/qubes-service/network-manager ]; then
|
|
|
|
# Allow also notification icon
|
|
|
|
sed -i -e '/QUBES/!s/^OnlyShowIn=.*/\0QUBES;/' /etc/xdg/autostart/nm-applet.desktop
|
2014-07-04 18:47:11 +02:00
|
|
|
sed -i -e '/^NotShowIn=.*/s/QUBES;//' /etc/xdg/autostart/nm-applet.desktop
|
2014-05-30 22:44:50 +02:00
|
|
|
else
|
|
|
|
# Disable notification icon
|
|
|
|
sed -i -e '/^OnlyShowIn=.*/s/QUBES;//' /etc/xdg/autostart/nm-applet.desktop
|
2014-07-04 18:47:11 +02:00
|
|
|
sed -i -e '/QUBES/!s/^NotShowIn=.*/\0QUBES;/' /etc/xdg/autostart/nm-applet.desktop
|
2014-05-30 22:44:50 +02:00
|
|
|
fi
|
2012-01-10 12:10:16 +01:00
|
|
|
|
|
|
|
exit 0
|