]> TLD Linux GIT Repositories - packages/rc-scripts.git/blobdiff - misc_fixes.patch
- merged UUID support for cryptsetup script and misc bonding script fix
[packages/rc-scripts.git] / misc_fixes.patch
index 66e3a275fd9d4b976956ca3237e7dc7266e0808e..21c5c1af8fa46abe30b5c43e7351848dc0dae57e 100644 (file)
@@ -1,13 +1,53 @@
-diff --git a/lib/functions b/lib/functions
-index ced6e97..fac4c46 100644
---- a/lib/functions
-+++ b/lib/functions
-@@ -607,7 +607,7 @@ _daemon_set_ulimits() {
- # A function to start a program (now it's useful on read-only filesystem too)
- daemon() {
--      local errors="" prog="" end="" waitname="" waittime=""
-+      local errors="" prog="" end="" waitname="" waittime=0
-       local exit_code=0
-       local nice=$SERVICE_RUN_NICE_LEVEL
-       local fork user closefds redirfds pidfile makepid chdir=/
+diff --git a/lib/ifdown-bond b/lib/ifdown-bond
+index 1d81ecb..80a2cf2 100755
+--- a/lib/ifdown-bond
++++ b/lib/ifdown-bond
+@@ -38,7 +38,7 @@ setup_ip_param
+ LC_ALL=C ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
+ # release slave devices
+-for SLAVE_DEV in $(cat /sys/class/net/${DEVICE}/bonding/slaves); do
++for SLAVE_DEV in $(cat /sys/class/net/${DEVICE}/bonding/slaves 2>/dev/null); do
+       echo "-${SLAVE_DEV}" > /sys/class/net/${DEVICE}/bonding/slaves
+ done
+diff --git a/rc.d/init.d/cryptsetup b/rc.d/init.d/cryptsetup
+index 0e7f272..e2ff60e 100755
+--- a/rc.d/init.d/cryptsetup
++++ b/rc.d/init.d/cryptsetup
+@@ -95,6 +95,10 @@ init_crypto() {
+                       continue
+               fi
++              if echo "$src" | grep -q -E "^UUID=" ; then
++                      src="/dev/disk/by-uuid/${src##UUID=}"
++              fi
++
+               if [ ! -b "$src"  ]; then
+                       nls "$src: No such device"
+                       ret=1
+diff --git a/rc.d/init.d/network b/rc.d/init.d/network
+index 5e8cd20..b44e291 100755
+--- a/rc.d/init.d/network
++++ b/rc.d/init.d/network
+@@ -168,7 +168,7 @@ find_boot_interfaces() {
+                               DEVICE=""; ONBOOT=""; USERS=""; . "$i" 2>/dev/null
+                               [ "${DEVICE:+set}" != "set" ] && continue
+                               [ ${USERS:-no} != no ] && continue
+-                              is_yes [ ${ONBOOT:-no} && echo "${i##*/ifcfg-}"
++                              is_yes ${ONBOOT:-no} && echo "${i##*/ifcfg-}"
+                       done
+               `
+diff --git a/sysconfig/system b/sysconfig/system
+index a196f21..a4f125d 100644
+--- a/sysconfig/system
++++ b/sysconfig/system
+@@ -13,7 +13,6 @@ FASTRC=no
+ CONSOLE_LOGLEVEL=1
+ # On errors (when system is starting) run sulogin instead of shell ?
+-# This option disables debuginitrd=sh in geninitrd as well.
+ RUN_SULOGIN_ON_ERR=yes
+ # Default run nice level for all services if $SERVICE_RUN_NICE_LEVEL is not