~ubuntu-branches/ubuntu/saucy/netbase/saucy

« back to all changes in this revision

Viewing changes to debian/netbase.postrm

  • Committer: Bazaar Package Importer
  • Author(s): Lorenzo De Liso
  • Date: 2010-11-08 12:25:31 UTC
  • mfrom: (1.1.11 sid)
  • Revision ID: james.westby@ubuntu.com-20101108122531-rmi2wpcqab27f2nq
Tags: 4.43ubuntu1
* Merge from debian unstable (LP: #671193), remaining changes:
  - debian/netbase.init:
    + silence ifup/ifdown if VERBOSE == no
    + silence debuging output if VERBOSE == no
    + Temporarily increase usplash timeout to 120 seconds
      to cope with slop DHCP server responses. LP: #21617
    + Replace the "start" command with a call to upstart-job
  - debian/control: Depend on upstart-job
  - debian/netbase.postinst:
    + Remove old start symlinks on upgrade
    + Only install symlinks for runlevel 0 and 6
* Dropped changes:
  - Don't deconfigure network interfaces if /etc/iscsi/iscsi.initramfs
    exists, since that probably indicates root on iSCSI (LP: #447377): fixed
    in debian

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
#!/bin/sh -e
2
2
 
 
3
delete_if_md5_matches() {
 
4
  local md5
 
5
 
 
6
  if [ -e /etc/hosts ]; then
 
7
  md5="$(md5sum /etc/hosts | sed -e 's/ .*//')"
 
8
  case "$md5" in
 
9
  05e70b0d3ac00a2fbc94781871ae9aa8) rm /etc/hosts ;;
 
10
  esac
 
11
  fi
 
12
 
 
13
  if [ -e /etc/networks ]; then
 
14
  md5="$(md5sum /etc/networks | sed -e 's/ .*//')"
 
15
  case "$md5" in
 
16
  d013c6de91b961753d4ba901347aa6c8) rm /etc/networks ;;
 
17
  esac
 
18
  fi
 
19
}
 
20
 
3
21
case "$1" in
4
22
    remove)
5
23
    ;;
6
24
 
7
25
    purge)
8
26
    update-rc.d networking remove > /dev/null
 
27
    if [ -d /etc/sysctl.d/ ]; then
 
28
        rm -f /etc/sysctl.d/bindv6only.conf
 
29
        rmdir --ignore-fail-on-non-empty /etc/sysctl.d/
 
30
    fi
 
31
    delete_if_md5_matches
9
32
    ;;
10
33
 
11
34
    upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)