postinst is in opennebula-node 4.12.3+dfsg-3.1build1.
This file is a maintainer script. It is executed when installing (*inst) or removing (*rm) the package.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 | #!/bin/sh
set -e
ONEHOME=/var/lib/one
ONE_GROUP=oneadmin
ONE_USER=oneadmin
if [ "$1" = "configure" ]; then
chown $ONE_USER:$ONE_GROUP $ONEHOME/vms
# Add oneadmin user into libvirtd group
if getent group libvirtd >/dev/null && ! getent group libvirtd | cut -f4 -d: | grep -q '\<$ONE_USER\>'; then
adduser $ONE_USER libvirtd
fi
# Add oneadmin user into kvm group
if getent group kvm >/dev/null && ! getent group kvm | cut -f4 -d: | grep -q '\<$ONE_USER\>'; then
adduser $ONE_USER kvm
fi
fi
|