summarylogtreecommitdiffstats
path: root/libvirt.install
blob: 2ec693c7ffedbd552438c5ea7e14df475f2c03cd (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
_libvirt_setup() {
  systemd-tmpfiles --create libvirt.conf
  rm -f /usr/lib/python?.?/site-packages/libvirt.pyc
  echo ">>> To use libvirt as a non-root user:"
  echo ">>>  Use polkit to grant access."
  echo ">>>  ...or change the access model in /etc/libvirt/libvirtd.conf."
  echo ">>>     (see unixperms.patch in PKGBUILD for help)"
  echo ""
}

post_install() {
  _libvirt_setup || return 1
  echo ">>> Be sure to see optdepends as you may find some of them helpful."
  echo ">>>  Especially: bridge-utils, dnsmasq, and hal."
  echo ""
  echo ">>> To start libvirt as a daemon (service) run"
  echo " for systemd: 'systemctl start libvirtd'"
  echo " for initscripts: '/etc/rc.d/libvirtd start'"
  echo ""
  echo ">>> To start libvirt as a daemon (service) on boot:"
  echo " for systemd: 'systemctl enable libvirtd'"
  echo " for initscripts: Add 'libvirtd' to daemons in /etc/rc.conf"
  echo ""
}

post_upgrade() {
  _libvirt_setup || return 1
  echo ">>> To finish the upgrade, restart libvirtd by:"
  echo ">>>  'systemctl restart libvirtd' as root (systemd) or"
  echo ">>>  '/etc/rc.d/libvirtd restart' as root (initscripts) or"
  echo ">>>  rebooting."
  echo ">>> You may also need to run 'rm -rf ~/.libvirt'"
  echo ""
}

post_remove() {
   rm -f /usr/lib/python[0-9].[0-9]/site-packages/libvirt.pyc
   echo ">>> You may wish to delete the group 'libvirt' if it still exists."
   echo ">>>  It can be removed by running 'groupdel libvirt' as root."
   echo ""
   depmod -a
}