misc-post.sh 1.1 KB

1234567891011121314151617181920212223242526272829303132333435
  1. #!/bin/sh
  2. if [ -f /var/run/qubes-service/yum-proxy-setup -o -f /var/run/qubes-service/updates-proxy-setup ]; then
  3. if [ -d /etc/apt/apt.conf.d ]; then
  4. echo 'Acquire::http::Proxy "http://10.137.255.254:8082/";' >> /etc/apt/apt.conf.d/01qubes-proxy
  5. fi
  6. if [ -d /etc/yum.conf.d ]; then
  7. echo proxy=http://10.137.255.254:8082/ > /etc/yum.conf.d/qubes-proxy.conf
  8. fi
  9. else
  10. if [ -d /etc/apt/apt.conf.d ]; then
  11. rm -f /etc/apt/apt.conf.d/01qubes-proxy
  12. fi
  13. if [ -d /etc/yum.conf.d ]; then
  14. echo > /etc/yum.conf.d/qubes-proxy.conf
  15. fi
  16. fi
  17. # Set IP address again (besides action in udev rules); this is needed by
  18. # DispVM (to override DispVM-template IP) and in case when qubes-ip was
  19. # called by udev before loading evtchn kernel module - in which case
  20. # qubesdb-read fails
  21. INTERFACE=eth0 /usr/lib/qubes/setup-ip
  22. [ -x /rw/config/rc.local ] && /rw/config/rc.local
  23. # Start services which haven't own proper systemd unit:
  24. if [ ! -f /usr/lib/systemd/system/cups.service ]; then
  25. if [ -f /var/run/qubes-service/cups ]; then
  26. /usr/sbin/service cups start
  27. fi
  28. fi
  29. exit 0