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
|
#!/bin/sh
set -e
case "$1" in
(configure)
# unlink if it's a symlink
if [ -L /var/empty ]; then
unlink /var/empty
fi
# delete if it's a file
if [ -f /var/empty ]; then
rm -rf /var/empty
fi
# guarantees it's a directory
mkdir -p /var/empty
if ! getent group cvdnetwork > /dev/null 2>&1
then
addgroup --system cvdnetwork
fi
# Create the kvm group when running inside a docker container.
if test -f /.dockerenv && ( ! getent group kvm > /dev/null 2>&1 )
then
addgroup --system kvm
fi
;;
esac
#DEBHELPER#
|