misc-post.sh 1.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940
  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. if [ -n "`ls -A /usr/local/lib 2>/dev/null`" -o \
  18. -n "`ls -A /usr/local/lib64 2>/dev/null`" ]; then
  19. ldconfig
  20. fi
  21. # Set IP address again (besides action in udev rules); this is needed by
  22. # DispVM (to override DispVM-template IP) and in case when qubes-ip was
  23. # called by udev before loading evtchn kernel module - in which case
  24. # qubesdb-read fails
  25. INTERFACE=eth0 /usr/lib/qubes/setup-ip
  26. [ -x /rw/config/rc.local ] && /rw/config/rc.local
  27. # Start services which haven't own proper systemd unit:
  28. if [ ! -f /usr/lib/systemd/system/cups.service ]; then
  29. if [ -f /var/run/qubes-service/cups ]; then
  30. /usr/sbin/service cups start
  31. fi
  32. fi
  33. exit 0