Sophie

Sophie

distrib > Fedora > 18 > i386 > by-pkgid > ec9097d33f8f45af0908f6495dec0ce2 > scriptlet

vdsm-4.10.3-10.fc18.i686.rpm

PREIN

/bin/sh
# Force standard locale behavior (English)
export LC_ALL=C

/usr/bin/getent passwd vdsm >/dev/null || \
    /usr/sbin/useradd -r -u 36 -g kvm -d /var/lib/vdsm \
        -s /sbin/nologin -c "Node Virtualization Manager" vdsm
/usr/sbin/usermod -a -G qemu,sanlock vdsm
/usr/sbin/usermod -a -G qemu,kvm sanlock

PREUN

/bin/sh
if [ "$1" -eq 0 ]; then
    /bin/systemctl --no-reload disable vdsmd.service > /dev/null 2>&1 || :
    /bin/systemctl stop vdsmd.service > /dev/null 2>&1 || :
fi
exit 0

POSTIN

/bin/sh
/usr/bin/vdsm-tool sebool-config || :
# set the vdsm "secret" password for libvirt
/usr/bin/vdsm-tool set-saslpasswd

# Have moved vdsm section in /etc/sysctl.conf to /etc/sysctl.d/vdsm.
# So Remove them if it is played with /etc/sysctl.conf.
if grep -q "# VDSM section begin" /etc/sysctl.conf; then
    /bin/sed -i '/# VDSM section begin/,/# VDSM section end/d' \
        /etc/sysctl.conf
fi

# Make the /etc/sysctl.d/vdsm take effect immediately after installation.
/sbin/sysctl -q -p /etc/sysctl.d/vdsm

if [ "$1" -eq 1 ] ; then
    /bin/systemctl enable vdsmd.service >/dev/null 2>&1 || :
    /bin/systemctl daemon-reload >/dev/null 2>&1 || :
fi
exit 0

POSTUN

/bin/sh
if [ "$1" -ge 1 ] ; then
    /bin/systemctl try-restart vdsmd.service >/dev/null 2>&1 || :
fi
exit 0