Lines 31-47
pidfile="%%STATEDIR%%/upsd.pid"
Link Here
|
31 |
start_precmd="nut_prestart" |
31 |
start_precmd="nut_prestart" |
32 |
stop_postcmd="nut_poststop" |
32 |
stop_postcmd="nut_poststop" |
33 |
|
33 |
|
|
|
34 |
nut_file_fixup=${nut_file_fixup:-"YES"} |
35 |
|
34 |
nut_prestart() { |
36 |
nut_prestart() { |
35 |
# |
37 |
# |
36 |
# As of PR/268960 UID/GID uucp is no longer used by nut. |
38 |
# As of PR/268960 UID/GID uucp is no longer used by nut. |
37 |
# Instead UID/GID nut is used. Make sure preexisting nut files |
39 |
# Instead UID/GID nut is used. Make sure preexisting nut files |
38 |
# and directories are owned by nut instead of uucp. |
40 |
# and directories are owned by nut instead of uucp. |
39 |
# |
41 |
# |
40 |
if [ -f ${nut_prefix}/etc/nut/upsd.users ]; then |
42 |
if [ "${nut_file_fixup}" == "YES" ] |
41 |
chgrp %%NUT_GROUP%% ${nut_prefix}/etc/nut/upsd.users |
43 |
find ${nut_prefix}/etc/nut -user uucp -exec chown nut {} \; |
|
|
44 |
find ${nut_prefix}/etc/nut -group uucp -exec chgrp nut {} \; |
45 |
find %%STATEDIR%% -user uucp -exec chown nut {} \; |
46 |
find %%STATEDIR%% -group uucp -exec chgrp nut {} \; |
42 |
fi |
47 |
fi |
43 |
find %%STATEDIR%% -user uucp -exec chown nut {} \; |
|
|
44 |
find %%STATEDIR%% -group uucp -exec chgrp nut {} \; |
45 |
|
48 |
|
46 |
${nut_prefix}/sbin/upsdrvctl start |
49 |
${nut_prefix}/sbin/upsdrvctl start |
47 |
} |
50 |
} |
48 |
- |
|
|