einfo "Network device ${WHITE}${DEVICE}${NORMAL} detected, DHCP broadcasting for IP. (Backgrounding)"
trap 2 3 11
ifconfig $DEVICE up >>$DEBUG 2>&1
- ( pump -i $DEVICE --script=/etc/grml/pump-script >>$DEBUG 2>&1 && echo finished_running_pump > /etc/network/status/$DEVICE ) &
+ ( pump -i $DEVICE --script=/usr/lib/grml-autoconfig/pump-runparts >>$DEBUG 2>&1 && echo finished_running_pump > /etc/network/status/$DEVICE ) &
trap "" 2 3 11
sleep 1
eend 0
dh_testdir
dh_testroot
dh_clean -k
- dh_installdirs etc/grml etc/init.d usr/sbin usr/bin usr/share/doc/grml-saveconfig
+ dh_installdirs etc/grml etc/init.d usr/sbin usr/bin usr/share/doc/grml-saveconfig usr/lib/grml-autoconfig
# Add here commands to install the package into debian/grml-autoconfig.
install -m 755 grml-autoconfig debian/grml-autoconfig/etc/init.d/grml-autoconfig
install -m 755 bin/mkpersistenthome debian/grml-autoconfig/usr/bin/mkpersistenthome
install -m 755 bin/restore-config debian/grml-autoconfig/usr/bin/restore-config
install -m 755 bin/save-config debian/grml-autoconfig/usr/bin/save-config
+ install -m 755 lib/pump-runparts debian/grml-autoconfig/usr/lib/grml-autoconfig/pump-runparts
# just as a "backup" solution:
cp -a etc/* debian/grml-autoconfig/etc/
+++ /dev/null
-#!/bin/sh
-# PUMP Script
-# $1 Calling circumstance (up, renewal, down)
-# $2 interface
-# $3 ip
-
-# Exit early, if we're not being called for the initial lease
-[ "$1" != "up" ] && exit 0
-
-# See if we're needed at all, only run when booted with dhcphostname
-for i in $(cat /proc/cmdline)
-do
- if [ "$i" = "dhcphostname" ]
- then
- # dhcphostname is set, get the PTR for the ip
- hostname=$(host $3 | awk '{ print substr($5, 0, length($5)-1) }')
- if [ -n "$hostname" ]
- then
- echo $hostname > /etc/hostname
- fi
- fi
-done
--- /dev/null
+#!/bin/zsh -e
+# PUMP Script
+# $1 Calling circumstance (up, renewal, down)
+# $2 interface
+# $3 ip
+
+# Exit early, if we're not being called for the initial lease
+[ "$1" != "up" ] && exit 0
+
+. /etc/grml/autoconfig.functions
+
+
+# only run if no nodhcphostname parameter is given
+if ! checkbootparam 'nodhcphostname' ; then
+
+ hostname=$(host $3) || exit 1
+ # dhcphostname is set, get the PTR for the ip
+ hostname=$(echo ${hostname} | awk '{ print substr($5, 0, length($5)-1) }')
+
+ if [ -n "$hostname" ] ; then
+ echo $hostname > /etc/hostname
+ hostname -F /etc/hostname
+ fi
+fi
--- /dev/null
+#!/bin/sh -e
+
+arguments=""
+
+for ARG in $* ; do
+ arguments="${arguments} -a ${ARG} "
+done
+
+run-parts $arguments /etc/grml/pump-scripts.d/