updated on Thu Jan 26 16:09:46 UTC 2012
[aur-mirror.git] / jailkit / jailkit.sh
blobed8988961947b68954c969d5f0fbf1fb507af30a
1 # arg 1: the new package version
2 post_install() {
3 if ! grep -q /usr/sbin/jk_chrootsh /etc/shells ; then \
4 echo "Appending /usr/sbin/jk_chroots to /etc/shells";\
5 echo /usr/sbin/jk_chrootsh >> /etc/shells ;\
6 fi
9 # arg 1: the old package version
10 pre_remove() {
11 if grep -q /usr/sbin/jk_chrootsh /etc/shells ; then \
12 echo "Removing /usr/sbin/jk_chroots from /etc/shells";\
13 fil=`mktemp`
14 grep -v /usr/sbin/jk_chrootsh /etc/shells >${fil}
15 install -m 644 -o 0 -g 0 ${fil} /etc/shells
16 rm ${fil}
20 op=$1
21 shift
22 [ "$(type -t "$op")" = "function" ] && $op "$@"