~ubuntu-branches/ubuntu/raring/cvsd/raring

« back to all changes in this revision

Viewing changes to debian/postrm

  • Committer: Package Import Robot
  • Author(s): Arthur de Jong
  • Date: 2012-06-02 16:58:57 UTC
  • Revision ID: package-import@ubuntu.com-20120602165857-7mxp1k9a03mwosfn
Tags: 1.0.24
* bump debhelper compatibility to 9 and enable hardening flags (thanks
  Simon Ruderich) (closes: #662226)
* allow debconf preseeding of removal of chroot jail (closes: #672158)

Show diffs side-by-side

added added

removed removed

Lines of Context:
14
14
        CHROOT="$RET"
15
15
        db_title "Removing cvsd"
16
16
        db_subst cvsd/remove_chroot rootjail "$CHROOT"
17
 
        if db_input high cvsd/remove_chroot
 
17
        db_input high cvsd/remove_chroot || true
 
18
        db_go
 
19
        db_get cvsd/remove_chroot
 
20
        if [ "$RET" = "true" ]
18
21
        then
19
 
          db_go
20
 
          db_get cvsd/remove_chroot
21
 
          if [ "$RET" = "true" ]
22
 
          then
23
 
            rm -rf "$CHROOT"
24
 
          fi
25
 
        else
26
 
          echo "WARNING: not deleting $CHROOT!" >&2
 
22
          rm -rf "$CHROOT"
27
23
        fi
28
24
      fi
29
25
    fi
32
28
    # remove user/group
33
29
    if [ -x "$(command -v deluser)" ]
34
30
    then
35
 
       deluser --quiet --system cvsd > /dev/null || true
 
31
      deluser --quiet --system cvsd > /dev/null || true
36
32
    else
37
 
       echo "not removing cvsd system account because deluser command was not found" >&2
 
33
      echo "not removing cvsd system account because deluser command was not found" >&2
38
34
    fi
39
35
    if [ -x "$(command -v delgroup)" ]
40
36
    then
41
 
       delgroup --quiet --system cvsd > /dev/null || true
 
37
      delgroup --quiet --system cvsd > /dev/null || true
42
38
    else
43
 
       echo "not removing cvsd system group because delgroup command was not found" >&2
 
39
      echo "not removing cvsd system group because delgroup command was not found" >&2
44
40
    fi
45
41
    ;;
46
42
esac