Divert /etc/conserver/console.cf in the right binary package.
[invirt/packages/invirt-console.git] / debian / invirt-console-host.prerm
index 9d0b178..16b07d0 100755 (executable)
@@ -19,7 +19,7 @@ set -e
 
 case "$1" in
     remove|upgrade|deconfigure)
-        perl -i.bak -ne 's%^### (BEGIN|END) invirt-console-host\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
+        perl -i.bak -ne 'print unless /^### BEGIN invirt-console-host/../^### END invirt-console-host/' /etc/sudoers
     ;;
 
     failed-upgrade)