aboutsummaryrefslogtreecommitdiffstats
path: root/rc.d/init.d/functions
diff options
context:
space:
mode:
authorFlorian La Roche <laroche@redhat.com>2003-04-18 21:09:07 +0000
committerFlorian La Roche <laroche@redhat.com>2003-04-18 21:09:07 +0000
commita31c7a30dced003c0f96025fa76364eb523e832c (patch)
tree904347a550becd8209e41ad4f5dbd7f30d1ca0ff /rc.d/init.d/functions
parent475e9481742a2dc8419909e0fd6e257dc9b3c404 (diff)
downloadinitscripts-a31c7a30dced003c0f96025fa76364eb523e832c.tar
initscripts-a31c7a30dced003c0f96025fa76364eb523e832c.tar.gz
initscripts-a31c7a30dced003c0f96025fa76364eb523e832c.tar.bz2
initscripts-a31c7a30dced003c0f96025fa76364eb523e832c.tar.xz
initscripts-a31c7a30dced003c0f96025fa76364eb523e832c.zip
- new releaser7-16
Diffstat (limited to 'rc.d/init.d/functions')
-rwxr-xr-xrc.d/init.d/functions19
1 files changed, 5 insertions, 14 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 5b98cf76..ebfb2483 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -435,30 +435,21 @@ action() {
# returns OK if $1 contains $2
strstr() {
- #case "$1" in
- # *${2}*) return 0 ;;
- #esac
- #return 1
- [ "$1" = "$2" ] && return 0
- slice=${1#*$2*}
- [ "$slice" = "$1" ] && return 1
+ [ "${1#*$2*}" = "$1" ] && return 1
return 0
}
# Confirm whether we really want to run this service
confirm() {
- local YES=$"yY"
- local NO=$"nN"
- local CONT=$"cC"
-
while : ; do
echo -n $"Start service $1 (Y)es/(N)o/(C)ontinue? [Y] "
read answer
- if strstr "$YES" "$answer" || [ "$answer" = "" ] ; then
+ if strstr $"yY" "$answer" || [ "$answer" = "" ] ; then
return 0
- elif strstr "$CONT" "$answer" ; then
+ elif strstr $"cC" "$answer" ; then
+ rm -f /var/run/confirm
return 2
- elif strstr "$NO" "$answer" ; then
+ elif strstr $"nN" "$answer" ; then
return 1
fi
done