]> TLD Linux GIT Repositories - packages/rc-scripts.git/blob - rc-scripts-sh_fixes.patch
- updated for 0.4.13
[packages/rc-scripts.git] / rc-scripts-sh_fixes.patch
1 diff -urNp rc-scripts-0.4.13.orig/lib/functions rc-scripts-0.4.13/lib/functions
2 --- rc-scripts-0.4.13.orig/lib/functions        2015-02-06 13:30:49.000000000 +0000
3 +++ rc-scripts-0.4.13/lib/functions     2015-02-06 13:41:29.629314244 +0000
4 @@ -61,17 +61,6 @@ env_upstart=$USE_UPSTART
5  [ -r /etc/sysconfig/system ] && . /etc/sysconfig/system
6  [ -r /etc/sysconfig/bootsplash ] && . /etc/sysconfig/bootsplash
7  
8 -# if initscript is invoked via bash, enable RedHat/Fedora compatibility
9 -# RC_FEDORA is "set" if enabled and "unset" when not, but it's "value" is always empty
10 -# this is useful for inline constructs
11 -if [ "${BASH_VERSION+set}" = "set" ]; then
12 -       RC_LOGGING=yes
13 -       FASTRC=no
14 -       RC_FEDORA=
15 -else
16 -       unset RC_FEDORA || :
17 -fi
18 -
19  [ "$env_upstart" ] && USE_UPSTART=$env_upstart
20  
21  if [ -z "$VSERVER" -o "$VSERVER" = "detect" ]; then
22 @@ -471,7 +460,7 @@ busy() {
23  }
24  
25  ok() {
26 -       echo -ne "$_ok${RC_FEDORA+\\r}${RC_FEDORA-\\n}"
27 +       echo "$_ok"
28  }
29  
30  started() {
31 @@ -479,7 +468,7 @@ started() {
32  }
33  
34  fail() {
35 -       echo -ne "$_fail${RC_FEDORA+\\r}${RC_FEDORA-\\n}"
36 +       echo "$_fail"
37         return 1
38  }
39  
40 diff -urNp rc-scripts-0.4.13.orig/rc.d/rc rc-scripts-0.4.13/rc.d/rc
41 --- rc-scripts-0.4.13.orig/rc.d/rc      2014-06-10 06:55:19.000000000 +0000
42 +++ rc-scripts-0.4.13/rc.d/rc   2015-02-06 13:41:29.630314244 +0000
43 @@ -147,14 +147,15 @@ af7=$(termput op)
44  text="$(termput op)$(nls '%sResource Manager: %sEntering runlevel number' "$af2" "$af7")"
45  text_size="$(nls '%sResource Manager: %sEntering runlevel number' "" "")"
46  resp_size="$(nls 'DONE')"
47 -{
48 -       local _len=${#text_size}
49 -       local _last_col=$(($INIT_COL+${#resp_size}-${#runlevel}))
50 -       while [ $((_len++)) -lt $_last_col ]; do
51 -               text="$text."
52 -       done
53 -       echo -n "$text"
54 -}
55 +
56 +_len=${#text_size}
57 +_last_col=$(($INIT_COL+${#resp_size}-${#runlevel}))
58 +while [ $((_len++)) -lt $_last_col ]; do
59 +       text="$text."
60 +done
61 +echo -n "$text"
62 +unset _len _last_col
63 +
64  echo "${af6}[${af2} $runlevel ${af6}]${af7}"
65  
66  # Is there an rc directory for this new runlevel?
67 diff -urNp rc-scripts-0.4.13.orig/rc.d/rc.sysinit rc-scripts-0.4.13/rc.d/rc.sysinit
68 --- rc-scripts-0.4.13.orig/rc.d/rc.sysinit      2015-02-06 13:40:47.000000000 +0000
69 +++ rc-scripts-0.4.13/rc.d/rc.sysinit   2015-02-06 13:41:29.632314244 +0000
70 @@ -966,7 +966,7 @@ if ! is_yes "$VSERVER" && [[ "$container
71                 . /etc/rc.d/rc.serial
72         fi
73  
74 -       if [ -n "$PANIC_REBOOT_TIME" -a "$PANIC_REBOOT_TIME" -gt "0" -a -f /proc/sys/kernel/panic ]; then
75 +       if [ -n "$PANIC_REBOOT_TIME" ] && [ "$PANIC_REBOOT_TIME" -gt "0" ] && [ -f /proc/sys/kernel/panic ]; then
76                 show 'Setting %s seconds for kernel reboot after panic' "$PANIC_REBOOT_TIME"; busy
77                 # DEPRECATED: use /etc/sysctl.conf or kernel commandline instead
78                 if sysctl -q -w kernel.panic=$PANIC_REBOOT_TIME; then ok; else fail; fi