core-agent-linux/vm-systemd/misc-post.sh

36 lines
1.1 KiB
Bash
Raw Normal View History

#!/bin/sh
if [ -f /var/run/qubes-service/yum-proxy-setup -o -f /var/run/qubes-service/updates-proxy-setup ]; then
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
fi
if [ -d /etc/yum.conf.d ]; then
echo proxy=http://10.137.255.254:8082/ > /etc/yum.conf.d/qubes-proxy.conf
fi
else
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
fi
# Set IP address again (besides action in udev rules); this is needed by
# DispVM (to override DispVM-template IP) and in case when qubes-ip was
# called by udev before loading evtchn kernel module - in which case
2013-06-07 05:20:55 +02:00
# qubesdb-read fails
INTERFACE=eth0 /usr/lib/qubes/setup-ip
[ -x /rw/config/rc.local ] && /rw/config/rc.local
# Start services which haven't own proper systemd unit:
2015-09-01 17:19:59 +02:00
if [ ! -f /usr/lib/systemd/system/cups.service ]; then
if [ -f /var/run/qubes-service/cups ]; then
/usr/sbin/service cups start
fi
fi
exit 0