From: Evan Broder Date: Thu, 27 May 2010 15:58:35 +0000 (-0400) Subject: Use the .. Perl operator to simplify prerms. X-Git-Tag: 0.2.14~1 X-Git-Url: http://xvm.mit.edu/gitweb/invirt/packages/invirt-console.git/commitdiff_plain/8425261815b87bb395a57ff1c5dd731788ae7a51?hp=74a77bf6bd1a83872102d0d4080cee54b01caec8 Use the .. Perl operator to simplify prerms. invirt-console-host, invirt-dev, and all of the packages in xvm-munin-config previously used a convoluted one-liner to clean up /etc/sudoers, but we can do it much more easily using the .. operator. Taken from http://blog.ksplice.com/2010/05/top-10-perl-one-liner-tricks/ svn path=/trunk/packages/invirt-console/; revision=3011 --- diff --git a/debian/changelog b/debian/changelog index e476e95..4bda8a2 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,3 +1,9 @@ +invirt-console (0.2.14) unstable; urgency=low + + * Use the .. Perl operator to simplify the invirt-console-host prerm. + + -- Evan Broder Thu, 27 May 2010 11:55:53 -0400 + invirt-console (0.2.13) unstable; urgency=low * Changed dependency debathena-kerberos-config -> invirt-kerberos-config diff --git a/debian/invirt-console-host.postinst b/debian/invirt-console-host.postinst index 9f4b5a8..d2c7c08 100755 --- a/debian/invirt-console-host.postinst +++ b/debian/invirt-console-host.postinst @@ -20,9 +20,6 @@ set -e case "$1" in configure) - # Clean up the old sudoers line before we add it back - perl -i.bak -ne 's%^### (BEGIN|END) invirt-console-host\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers - cat >>/etc/sudoers <