X-Git-Url: https://vcs.maemo.org/git/?a=blobdiff_plain;f=debian%2Fkitchenalert%2FDEBIAN%2Fpostrm;fp=debian%2Fkitchenalert%2FDEBIAN%2Fpostrm;h=0000000000000000000000000000000000000000;hb=5724e243f3dacb50dc253f29e677c72fdc139732;hp=01e44f4d7fcbc340b1b1bf7b6f217a007f810e1e;hpb=d803b63625c649606113644c4e5bdb1894f56b40;p=kitchenalert diff --git a/debian/kitchenalert/DEBIAN/postrm b/debian/kitchenalert/DEBIAN/postrm deleted file mode 100755 index 01e44f4..0000000 --- a/debian/kitchenalert/DEBIAN/postrm +++ /dev/null @@ -1,34 +0,0 @@ -#! /bin/sh - -set -e - -#This checks whether there is a newline at the end of the file and adds one if there was not. -#Needed because sed deletes the last line if it does not end with a newline - -perl -e 'use strict;' \ --e 'use warnings;' \ --e 'open(my $in, "<", "/usr/share/policy/etc/current/pulse/xpolicy.conf") or die "Cannot open /usr/share/policy/etc/current/pulse/xpolicy.conf: $!";' \ --e 'my @lines = <$in>;' \ --e 'my $lastlineishere = $#lines;' \ --e 'my $lastline = $lines[$lastlineishere];' \ --e 'unless ($lastline =~ /\n$/){open(my $log, ">>", "/usr/share/policy/etc/current/pulse/xpolicy.conf") or die "Cannot open /usr/share/policy/etc/current/pulse/xpolicy.conf: $!"; print $log "\n"; }' - -#This removes three subsequent lines from xpolicy.conf if they all match (the lines added by the postinstall script) - -sed -i ' -/'[stream]'/ { -#append a line -N -#search for KitchenAlert on the second line -/\nexe\t= KitchenAlert/ { -N -#searh next line -/\ngroup\t= alarm/ { - -#s/'[stream]'.*alarm// -d -}}}' /usr/share/policy/etc/current/pulse/xpolicy.conf - -exit 0 - -