diff options
author | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-02-09 10:47:14 +0000 |
---|---|---|
committer | Rafael Garcia-Suarez <rgarciasuarez@mandriva.org> | 2006-02-09 10:47:14 +0000 |
commit | beaab801590c3bc0461f08c63432e0c3d3e2509b (patch) | |
tree | 1fc057dbbb0a66f3abdb307afa8dd6788105923e /add-service | |
parent | 5684ecf8c199f23c66a22497d0c327eb04c8f0af (diff) | |
download | rpm-helper-beaab801590c3bc0461f08c63432e0c3d3e2509b.tar rpm-helper-beaab801590c3bc0461f08c63432e0c3d3e2509b.tar.gz rpm-helper-beaab801590c3bc0461f08c63432e0c3d3e2509b.tar.bz2 rpm-helper-beaab801590c3bc0461f08c63432e0c3d3e2509b.tar.xz rpm-helper-beaab801590c3bc0461f08c63432e0c3d3e2509b.zip |
Patch by Ian D. Allen to handle rare case when a service name appears several
times in rc3.d (bug 12856)
Diffstat (limited to 'add-service')
-rwxr-xr-x | add-service | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/add-service b/add-service index 94cc21d..2fc6bc5 100755 --- a/add-service +++ b/add-service @@ -71,10 +71,14 @@ else # if the service is activated, add it again to be able to handle # changes in start/stop levels - if [ -f /etc/rc3.d/S??$srv ]; then + set -- /etc/rc3.d/S??$srv + if [ $# -gt 1 ]; then + echo 1>&2 "add-service: Error: $srv appears multiple times: $*" + fi + if [ -f "$1" ]; then /sbin/chkconfig --add $srv fi - + # restart the service if already running if [ -f /var/lock/subsys/$srv ]; then /sbin/service $srv restart > /dev/null 2>/dev/null || : |