Changeset 1770 for trunk


Ignore:
Timestamp:
Nov 25, 2008, 8:16:34 AM (16 years ago)
Author:
broder
Message:

Fix invirt-dev to not add the same line a bunch of times to sudoers

Location:
trunk/packages/invirt-dev/debian
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/packages/invirt-dev/debian/changelog

    r1671 r1770  
     1invirt-dev (0.0.9) unstable; urgency=low
     2
     3  * Don't add the same line a bunch of times to /etc/sudoers
     4
     5 -- Evan Broder <broder@mit.edu>  Tue, 25 Nov 2008 08:16:17 -0500
     6
    17invirt-dev (0.0.8) unstable; urgency=low
    28
  • trunk/packages/invirt-dev/debian/invirt-dev.postinst

    • Property svn:executable set to *
    r1329 r1770  
    99            adduser --system repository
    1010            addgroup --system repo
    11             echo "%repo   ALL=(repository)        ALWAYS_SET_HOME,NOPASSWD: /usr/bin/reprepro" >>/etc/sudoers
     11           
     12            # Clean up the old sudoers block, then add it back
     13            perl -i.bak -ne 's%^### (BEGIN|END) invirt-dev\s*$%%m && ($skip = ($1 eq "BEGIN")); print unless $skip;' /etc/sudoers
     14           
     15            cat >>/etc/sudoers <<EOF
     16### BEGIN invirt-dev
     17%repo   ALL=(repository)        ALWAYS_SET_HOME,NOPASSWD: /usr/bin/reprepro
     18### END invirt-dev
     19EOF
    1220            echo "-----"
    1321            echo "invirt-dev: run"
Note: See TracChangeset for help on using the changeset viewer.