From 8d75b8882d7b94577cacd6c60cc56107a8549708 Mon Sep 17 00:00:00 2001 From: Tzafrir Cohen Date: Wed, 4 Mar 2009 21:19:24 +0000 Subject: Adding two files that were accidentally ignored before. git-svn-id: svn+ssh://xorcom/home/svn/debs/components/rapid-tunneling@6824 283159da-0705-0410-b60c-f2062b4bb6ad --- debian/rapid-tunneling-gui.postinst | 46 +++++++++++++++++++++++++++++++++++++ debian/rapid-tunneling-gui.prerm | 20 ++++++++++++++++ 2 files changed, 66 insertions(+) create mode 100644 debian/rapid-tunneling-gui.postinst create mode 100644 debian/rapid-tunneling-gui.prerm diff --git a/debian/rapid-tunneling-gui.postinst b/debian/rapid-tunneling-gui.postinst new file mode 100644 index 0000000..b38c572 --- /dev/null +++ b/debian/rapid-tunneling-gui.postinst @@ -0,0 +1,46 @@ +#!/bin/sh +# postinst script for rapid-tunneling +# +# see: dh_installdeb(1) + +set -e + +# summary of how this script can be called: +# * `configure' +# * `abort-upgrade' +# * `abort-remove' `in-favour' +# +# * `abort-remove' +# * `abort-deconfigure' `in-favour' +# `removing' +# +# for details, see http://www.debian.org/doc/debian-policy/ or +# the debian-policy package + +SUDOERS=/etc/sudoers +LINE="www-data ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling" +LINE2="www-data ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling-status" + +case "$1" in + configure) + if ! fgrep -q "$LINE" $SUDOERS; then echo "$LINE" >> $SUDOERS; fi + if ! fgrep -q "$LINE2" $SUDOERS; then echo "$LINE2" >> $SUDOERS; fi + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +# dh_installdeb will replace this with shell code automatically +# generated by other debhelper scripts. + +#DEBHELPER# + +exit 0 + + diff --git a/debian/rapid-tunneling-gui.prerm b/debian/rapid-tunneling-gui.prerm new file mode 100644 index 0000000..659585b --- /dev/null +++ b/debian/rapid-tunneling-gui.prerm @@ -0,0 +1,20 @@ +#!/bin/sh + +set -e + +SUDOERS=/etc/sudoers +LINE="www-data ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling" +LINE2="www-data ALL=(rapid-tunneling) NOPASSWD:/usr/sbin/rapid-tunneling-status" + +case "$1" in + remove|upgrade|deconfigure) + fgrep -v "$LINE" $SUDOERS > ${SUDOERS}.tmp && cp ${SUDOERS}.tmp $SUDOERS && rm ${SUDOERS}.tmp + fgrep -v "$LINE2" $SUDOERS > ${SUDOERS}.tmp && cp ${SUDOERS}.tmp $SUDOERS && rm ${SUDOERS}.tmp + ;; +esac + +#DEBHELPER# + +exit 0 + + -- cgit v1.2.3