post_install() { # create user for uuidd if ! getent group uuidd >/dev/null; then groupadd -r uuidd fi if ! getent passwd uuidd >/dev/null; then useradd -r -s /sbin/nologin -d / -g uuidd uuidd fi # we don't want use systemd-tmpfiles here because # the package dependency would create a circular dep. if [ ! -d run/uuidd ]; then install -o uuidd -g uuidd -dm755 run/uuidd fi } post_upgrade() { if [ "$(vercmp $2 2.21.2-4)" -lt 0 ]; then if [ -f /var/lib/hwclock/adjtime ]; then mv /var/lib/hwclock/adjtime /etc/adjtime fi if [ -d /var/lib/hwclock ]; then rmdir /var/lib/hwclock fi fi post_install } post_remove() { if getent passwd uuidd >/dev/null; then userdel uuidd fi if getent group uuidd >/dev/null; then userdel uuidd fi }