Bug 70712
Summary: | irda initscript has wrong error handling | ||
---|---|---|---|
Product: | [Retired] Red Hat Linux | Reporter: | Peter van Egdom <p.van.egdom> |
Component: | irda-utils | Assignee: | wdovlrrw <brosenkr> |
Status: | CLOSED NOTABUG | QA Contact: | Jay Turner <jturner> |
Severity: | low | Docs Contact: | |
Priority: | medium | ||
Version: | 8.0 | CC: | srevivo |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | i386 | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2003-07-03 13:26:35 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Peter van Egdom
2002-08-04 14:20:15 UTC
Still occurs in Red Hat Linux 8.0. You can't restart services as a normal user. That's not limited to irda. With this Bugzilla report I specifically meant the exit handling of this
initscript. The use of "/etc/rc.d/init.d/irda start" as a normal user results in
the following strange error :
touch: cannot touch `/var/lock/subsys/irda': Permission deniedOK '
It would be 'tidier' to patch the script as follows :
< echo -n $"Starting $prog: "
< daemon /usr/sbin/irattach ${DEVICE} ${ARGS}
< touch /var/lock/subsys/irda
< echo
---
> ID=`id -u`
> if [ $ID -eq 0 ]; then
> echo -n $"Starting $prog: "
> daemon /usr/sbin/irattach ${DEVICE} ${ARGS}
> touch /var/lock/subsys/irda
> echo
> else
> echo $"You need to be root to start this script ! "
> fi
Of course, this is only for the start parameter of the script, but if the script
is called this way (a a normal user) it will at least give a proper error message.
|