home *** CD-ROM | disk | FTP | other *** search
/ PC Welt 2006 November (DVD) / PCWELT_11_2006.ISO / casper / filesystem.squashfs / var / lib / dpkg / info / dhcp3-client.postinst < prev    next >
Encoding:
Text File  |  2006-07-24  |  973 b   |  38 lines

  1. #!/bin/sh -e
  2. #
  3. # $Id: dhcp3-client.postinst,v 1.1.1.1 2002/05/21 00:07:44 peloy Exp $
  4. #
  5.  
  6. # Source debconf library.
  7. . /usr/share/debconf/confmodule
  8.  
  9. case "$1" in
  10.     configure)
  11.         if [ ! -e /var/lib/dhcp3/dhclient.leases ]; then
  12.             if test -e /var/lib/dhcp/dhclient.leases; then
  13.                 cp /var/lib/dhcp/dhclient.leases /var/lib/dhcp3/dhclient.leases
  14.             else
  15.                 touch /var/lib/dhcp3/dhclient.leases
  16.             fi
  17.         fi
  18.         
  19.         # create system dhcp user and group
  20.         adduser --system --quiet --no-create-home --home /nonexistent --group dhcp
  21.  
  22.         # allow dhcp client to call setuid wrapper
  23.         chown root:dhcp /lib/dhcp3-client/call-dhclient-script
  24.         chmod 4754 /lib/dhcp3-client/call-dhclient-script
  25.         ;;
  26.  
  27.     abort-upgrade|abort-remove|abort-deconfigure)
  28.         exit 0
  29.         ;;
  30.     
  31.     *)
  32.         echo "postinst called with unknown argument \`$1'" >&2
  33.         exit 0
  34.         ;;
  35. esac
  36.  
  37.  
  38.