Skip /var/lock/subsys actions when running as unprivileged user

Description

The current start / stop script assumes that it is running as a privileged user and always tries to create / remove /var/lock/subsys/opennms. When running as an unprivileged user, this makes a bunch of noise. We should check whether we have write access to that directory and gate the attempt at creation / removal on that ability.

Environment

POSIX platforms when running as an unprivileged user

Acceptance / Success Criteria

None

Lucidchart Diagrams

Activity

Show:

Jeff Gehlbach December 19, 2016 at 4:32 PM

Fixed

Details

Assignee

Reporter

Labels

Components

Affects versions

Priority

PagerDuty

Created December 19, 2016 at 4:26 PM
Updated December 20, 2016 at 4:08 PM
Resolved December 20, 2016 at 11:08 AM