aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d
diff options
context:
space:
mode:
Diffstat (limited to 'rc.d')
-rwxr-xr-xrc.d/init.d/single13
-rwxr-xr-xrc.d/rc14
-rwxr-xr-xrc.d/rc.sysinit1
3 files changed, 15 insertions, 13 deletions
diff --git a/rc.d/init.d/single b/rc.d/init.d/single
index df645e7e..64c6806d 100755
--- a/rc.d/init.d/single
+++ b/rc.d/init.d/single
@@ -29,15 +29,16 @@ fi
# If they want to run something in single user mode, might as well run it...
for i in /etc/rc1.d/S[0-9][0-9]* ; do
# Check if the script is there.
- [ -f "$i" ] || continue
+ [ -x "$i" ] || continue
- # Don't run [KS]??foo.{rpmsave,rpmorig} scripts
- [ "${i%.rpmsave}" != "$i" ] && continue
- [ "${i%.rpmorig}" != "$i" ] && continue
- [ "${i%.rpmnew}" != "$i" ] && continue
+ # Reject backup files and files generated by rpm.
+ case "$1" in
+ *.rpmsave|*.rpmorig|*.rpmnew|*~|*.orig)
+ continue;;
+ esac
[ "$i" = "/etc/rc1.d/S00single" ] && continue
$i start
-done
+done
# Now go to the single user level.
echo $"Telling INIT to go to single user mode."
diff --git a/rc.d/rc b/rc.d/rc
index 40cf3188..33b6ed71 100755
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -10,13 +10,15 @@
# check a file to be a correct runlevel script
check_runlevel ()
{
- # Check if the script is there.
- [ -f "$1" ] || return 1
+ # Check if the file exists at all.
+ [ -x "$1" ] || return 1
- # Don't run [KS]??foo.{rpmsave,rpmorig} scripts
- [ "${1%.rpmsave}" != "$1" ] && return 1
- [ "${1%.rpmorig}" != "$1" ] && return 1
- [ "${1%.rpmnew}" != "$1" ] && return 1
+ # Reject backup files and files generated by rpm.
+ case "$1" in
+ *.rpmsave|*.rpmorig|*.rpmnew|*~|*.orig)
+ return 1
+ ;;
+ esac
return 0
}
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 2cd1d7de..3f5b8f0d 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -59,7 +59,6 @@ if grep -q /initrd /proc/mounts && ! grep -q /initrd/loopfs /proc/mounts ; then
fi
# Configure kernel parameters
-
action $"Configuring kernel parameters: " sysctl -e -p /etc/sysctl.conf
# Set the system clock.