Browse Source

- add udhcpc script to support busybox-cvs

- don't build netcfg-dhcp for s390

r2899
master
Bastian Blank 20 years ago
parent
commit
93c2484248
  1. 5
      debian/changelog
  2. 4
      debian/control
  3. 2
      debian/rules
  4. 29
      udhcpc.default.script

5
debian/changelog

@ -8,8 +8,11 @@ netcfg (0.23) UNRELEASED; urgency=low
- Update Brazilian Portuguese (pt_BR) template translations.
* Alastair McKinstry
- netcfg.c: Add additional interfaces that we may use
* Bastian Blank
- add udhcpc script to support busybox-cvs
- don't build netcfg-dhcp for s390
-- Alastair McKinstry <mckinstry@computer.org> Thu, 20 Mar 2003 21:20:43 +0000
-- Bastian Blank <waldi@debian.org> Mon, 28 Apr 2003 20:43:02 +0200
netcfg (0.22) unstable; urgency=low

4
debian/control

@ -7,8 +7,8 @@ Build-Depends: debhelper (>= 4.1.13), dpkg-dev (>= 1.9.0), libcdebconf-dev, libd
Standards-Version: 3.1.1
Package: netcfg-dhcp
Architecture: any
Depends: ${shlibs:Depends}, cdebconf-udeb, dhcp-client-udeb | pump-udeb
Architecture: i386 sparc alpha m68k arm powerpc mips mipsel hppa ia64
Depends: ${shlibs:Depends}, cdebconf-udeb, dhcp-client-udeb | pump-udeb | busybox-cvs-udeb | busybox-cvs-net-udeb
Provides: configured-network
XB-Installer-Menu-Item: 12
Description: Configure the network via DHCP

2
debian/rules

@ -47,6 +47,8 @@ install: build
dh_clean -k
cp netcfg-dhcp debian/netcfg-dhcp.postinst
cp netcfg-static debian/netcfg-static.postinst
mkdir -p debian/netcfg-dhcp/usr/share/udhcpc
install -m755 udhcpc.default.script debian/netcfg-dhcp/usr/share/udhcpc/default.script
mkdir -p debian/netcfg-dhcp/etc/dhcp debian/netcfg-dhcp/var/dhcp
mkdir -p debian/netcfg-static/etc/network
mkdir -p debian/netcfg-dhcp/usr/lib/prebaseconfig.d

29
udhcpc.default.script

@ -0,0 +1,29 @@
#!/bin/sh
[ -z "$1" ] && echo "Error: should be called from udhcpc" && exit 1
RESOLV_CONF="/etc/resolv.conf"
case "$1" in
deconfig)
ip link set $interface up
;;
renew|bound)
ip addr flush dev $interface
ip addr add $ip/$mask dev $interface
if [ -n "$router" ]; then
ip route flush match 0 dev $interface
for i in $router ; do
ip route add default via $i # dev $interface
done
fi
echo -n > $RESOLV_CONF
[ -n "$domain" ] && echo search $domain >> $RESOLV_CONF
for i in $dns ; do
echo nameserver $i >> $RESOLV_CONF
done
;;
esac
exit 0
Loading…
Cancel
Save