<commit_before>
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

--- busybox-1.00-rc3/examples/udhcp/simple.script~udhcpscript
+++ busybox-1.00-rc3/examples/udhcp/simple.script
@@ -17,8 +17,7 @@
 		/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
 
 		if [ -n "$router" ] ; then
-			echo "deleting routers"
-			while route del default gw 0.0.0.0 dev $interface ; do
+			while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
 				:
 			done
 <commit_msg>busybox-1.11.3: udhcpd script: Do not deconfig network interface iff rootfs on nfs.<commit_after>
#
# Patch managed by http://www.holgerschurig.de/patcher.html
#

Index: busybox-1.11.3/examples/udhcp/simple.script
===================================================================
--- busybox-1.11.3.orig/examples/udhcp/simple.script	2008-06-25 14:51:33.000000000 +0200
+++ busybox-1.11.3/examples/udhcp/simple.script	2009-01-06 14:34:40.000000000 +0100
@@ -8,17 +8,23 @@
 [ -n "$broadcast" ] && BROADCAST="broadcast $broadcast"
 [ -n "$subnet" ] && NETMASK="netmask $subnet"
 
+# return 0 if root is mounted on a network filesystem
+root_is_nfs() {
+	grep -qe '^/dev/root.*\(nfs\|smbfs\|ncp\|coda\) .*' /proc/mounts
+}
+
 case "$1" in
 	deconfig)
-		/sbin/ifconfig $interface 0.0.0.0
+		if [ ! root_is_nfs ]; then
+			/sbin/ifconfig $interface 0.0.0.0
+		fi
 		;;
 
 	renew|bound)
 		/sbin/ifconfig $interface $ip $BROADCAST $NETMASK
 
 		if [ -n "$router" ] ; then
-			echo "deleting routers"
-			while route del default gw 0.0.0.0 dev $interface ; do
+			while route del default gw 0.0.0.0 dev $interface 2>/dev/null ; do
 				:
 			done
 
{'fraction_non_alphanumeric': 0.1998769987699877, 'fraction_numerical': 0.07257072570725707, 'mean_word_length': 3.29287598944591, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 6, 'substrings_counts': 2, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4733424', 'n_tokens_mistral': 764, 'n_tokens_neox': 653, 'n_words': 139}