]> TLD Linux GIT Repositories - packages/rc-scripts.git/blob - misc_fixes.patch
- fix network scripts regex for newer iproute2, fixes removal of local ip rules
[packages/rc-scripts.git] / misc_fixes.patch
1 diff --git a/lib/ifdown-bond b/lib/ifdown-bond
2 index 1d81ecb..80a2cf2 100755
3 --- a/lib/ifdown-bond
4 +++ b/lib/ifdown-bond
5 @@ -38,7 +38,7 @@ setup_ip_param
6  LC_ALL=C ip addr flush dev ${DEVICE} 2>&1 | grep -v "Nothing to flush"
7  
8  # release slave devices
9 -for SLAVE_DEV in $(cat /sys/class/net/${DEVICE}/bonding/slaves); do
10 +for SLAVE_DEV in $(cat /sys/class/net/${DEVICE}/bonding/slaves 2>/dev/null); do
11         echo "-${SLAVE_DEV}" > /sys/class/net/${DEVICE}/bonding/slaves
12  done
13  
14 diff --git a/rc.d/init.d/cryptsetup b/rc.d/init.d/cryptsetup
15 index 0e7f272..e2ff60e 100755
16 --- a/rc.d/init.d/cryptsetup
17 +++ b/rc.d/init.d/cryptsetup
18 @@ -95,6 +95,10 @@ init_crypto() {
19                         continue
20                 fi
21  
22 +               if echo "$src" | grep -q -E "^UUID=" ; then
23 +                       src="/dev/disk/by-uuid/${src##UUID=}"
24 +               fi
25 +
26                 if [ ! -b "$src"  ]; then
27                         nls "$src: No such device"
28                         ret=1
29 diff --git a/rc.d/init.d/network b/rc.d/init.d/network
30 index 5e8cd20..b44e291 100755
31 --- a/rc.d/init.d/network
32 +++ b/rc.d/init.d/network
33 @@ -168,7 +168,7 @@ find_boot_interfaces() {
34                                 DEVICE=""; ONBOOT=""; USERS=""; . "$i" 2>/dev/null
35                                 [ "${DEVICE:+set}" != "set" ] && continue
36                                 [ ${USERS:-no} != no ] && continue
37 -                               is_yes [ ${ONBOOT:-no} && echo "${i##*/ifcfg-}"
38 +                               is_yes ${ONBOOT:-no} && echo "${i##*/ifcfg-}"
39                         done
40                 `
41  
42 diff --git a/sysconfig/system b/sysconfig/system
43 index a196f21..a4f125d 100644
44 --- a/sysconfig/system
45 +++ b/sysconfig/system
46 @@ -13,7 +13,6 @@ FASTRC=no
47  CONSOLE_LOGLEVEL=1
48  
49  # On errors (when system is starting) run sulogin instead of shell ?
50 -# This option disables debuginitrd=sh in geninitrd as well.
51  RUN_SULOGIN_ON_ERR=yes
52  
53  # Default run nice level for all services if $SERVICE_RUN_NICE_LEVEL is not
54 diff --git a/lib/functions.network b/lib/functions.network
55 index d151b04..862d42b 100644
56 --- a/lib/functions.network
57 +++ b/lib/functions.network
58 @@ -484,7 +484,7 @@ setup_ip_rules ()
59                                 /sbin/ip rule add $args $prio
60                         done
61                 elif is_no "$1"; then
62 -                       LC_ALL=C /sbin/ip rule show | grep -vE -e "from all lookup (main|default|local|253|254|255) \$" -e " map-to " | while read prio from src args; do
63 +                       LC_ALL=C /sbin/ip rule show | grep -vE -e "from all lookup (main|default|local|253|254|255)[[:space:]]*\$" -e " map-to " | while read prio from src args; do
64                                 [ "$src" = "all" ] && /sbin/ip rule delete $args || /sbin/ip rule delete $from $src $args
65                         done
66                 fi
67 @@ -503,7 +503,7 @@ setup_ip_rules ()
68                                 /sbin/ip -6 rule add $args $prio
69                         done
70                 elif is_no "$1"; then
71 -                       LC_ALL=C /sbin/ip -6 rule show | grep -vE -e "from all lookup (main|default|local|253|254|255) \$" -e " map-to " | while read prio from src args; do
72 +                       LC_ALL=C /sbin/ip -6 rule show | grep -vE -e "from all lookup (main|default|local|253|254|255)[[:space:]]*\$" -e " map-to " | while read prio from src args; do
73                                 [ "$src" = "all" ] && /sbin/ip -6 rule delete $args || /sbin/ip -6 rule delete $from $src $args
74                         done
75                 fi