damaris-backends/debian/damaris-backends.postinst

28 lines
771 B
Bash
Executable File

#! /bin/sh
if grep nmr /etc/group >/dev/null; then
echo "group nmr already exists" ;
else
echo "creating group nmr" ;
groupadd nmr || echo "failed!"
fi
find /usr/lib/damaris/backends -type f \
\! -name dummycore \
-exec chgrp nmr {} \; \
-exec chmod u+s,o= {} \;
#DEBHELPER#
if [ "$1" = "configure" -a -n "$2" ]; then
comparableversion=`echo "$2"|sed 's/[\.-]/ /g'|xargs printf "%03d%03d%03d"`
if [ "000011000" -gt $comparableversion ]; then
# transition to version with udev
if [ \! -e /etc/udev/rules.d/z60_damaris-backends.rules ]; then
# check whether the link/script was done when updating from 0.11 to newer version
ln -s ../damaris-backends.rules /etc/udev/rules.d/z60_damaris-backends.rules
fi
fi
fi