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
|
2015-08-08 02:01:15 +02:00
|
|
|
INSTALL_CMD='/usr/bin/qubes-desktop-file-install --force --dir /var/lib/qubes/xdg/autostart'
|
2015-08-02 23:30:26 +02:00
|
|
|
|
2012-01-10 12:10:16 +01:00
|
|
|
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
|
2015-08-02 23:30:26 +02:00
|
|
|
$INSTALL_CMD --remove-not-show-in X-QUBES /etc/xdg/autostart/print-applet.desktop
|
2012-01-10 12:10:16 +01:00
|
|
|
else
|
|
|
|
# Disable notification icon
|
2015-08-02 23:30:26 +02:00
|
|
|
$INSTALL_CMD --add-not-show-in X-QUBES /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
|
2015-08-02 23:30:26 +02:00
|
|
|
$INSTALL_CMD --remove-not-show-in X-QUBES --add-only-show-in X-QUBES /etc/xdg/autostart/nm-applet.desktop
|
2014-05-30 22:44:50 +02:00
|
|
|
else
|
|
|
|
# Disable notification icon
|
2015-08-02 23:30:26 +02:00
|
|
|
$INSTALL_CMD --remove-only-show-in X-QUBES --add-not-show-in X-QUBES /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
|