]> git.ozlabs.org Git - petitboot/commitdiff
Rename udhcpc to pb-udhcpc
authorGeoff Levand <geoff@infradead.org>
Sun, 12 Feb 2012 20:46:43 +0000 (12:46 -0800)
committerGeoff Levand <geoff@infradead.org>
Sun, 12 Feb 2012 20:46:43 +0000 (12:46 -0800)
Signed-off-by: Geoff Levand <geoff@infradead.org>
utils/pb-udhcpc [new file with mode: 0644]
utils/udhcpc [deleted file]

diff --git a/utils/pb-udhcpc b/utils/pb-udhcpc
new file mode 100644 (file)
index 0000000..bc0f759
--- /dev/null
@@ -0,0 +1,38 @@
+#!/bin/sh
+#
+# Petitboot udhcpc user script.  Should be run by udhcpc when
+# there is a change in the dhcp configuration.  For more info
+# see the udhcpc man page and the Linux kernel source file
+# Documentation/filesystems/nfsroot.txt.
+#
+
+PBOOT_USER_EVENT_SOCKET="/tmp/petitboot.ev"
+log="pb-udhcpc.log"
+
+pb_add () {
+       k_server_ip=${rootpath%%:*}
+       k_root_dir=${rootpath#*:}
+
+       [ ${k_server_ip} != ${rootpath} ] || k_server_ip=${serverid}
+
+       echo -ne "add@/net/${interface}\0name=netboot\0image=tftp://${siaddr}${boot_file}\0args=root=/dev/nfs ip=any nfsroot=${k_server_ip}:${k_root_dir}\0" | pb-event
+}
+
+pb_remove () {
+       echo -ne "remove@/net/${interface}\0name=netboot\0" | pb-event
+}
+
+case "$1" in
+bound | renew)
+       pb_add
+       ;;
+deconfig)
+       pb_remove
+       ;;
+*)
+       ;;
+esac
+
+echo "--- $1 ---" >> ${log}
+set >> ${log}
+echo "---------------" >> ${log}
diff --git a/utils/udhcpc b/utils/udhcpc
deleted file mode 100644 (file)
index bc0f759..0000000
+++ /dev/null
@@ -1,38 +0,0 @@
-#!/bin/sh
-#
-# Petitboot udhcpc user script.  Should be run by udhcpc when
-# there is a change in the dhcp configuration.  For more info
-# see the udhcpc man page and the Linux kernel source file
-# Documentation/filesystems/nfsroot.txt.
-#
-
-PBOOT_USER_EVENT_SOCKET="/tmp/petitboot.ev"
-log="pb-udhcpc.log"
-
-pb_add () {
-       k_server_ip=${rootpath%%:*}
-       k_root_dir=${rootpath#*:}
-
-       [ ${k_server_ip} != ${rootpath} ] || k_server_ip=${serverid}
-
-       echo -ne "add@/net/${interface}\0name=netboot\0image=tftp://${siaddr}${boot_file}\0args=root=/dev/nfs ip=any nfsroot=${k_server_ip}:${k_root_dir}\0" | pb-event
-}
-
-pb_remove () {
-       echo -ne "remove@/net/${interface}\0name=netboot\0" | pb-event
-}
-
-case "$1" in
-bound | renew)
-       pb_add
-       ;;
-deconfig)
-       pb_remove
-       ;;
-*)
-       ;;
-esac
-
-echo "--- $1 ---" >> ${log}
-set >> ${log}
-echo "---------------" >> ${log}