++ 23/07/01 18:21 -0700 - Romain Kang:
| I've been using this in a PLIST:
|
| 1 @exec test -d %D/var/run/procstates || mkdir -p %D/var/run/procstates
| 2 @exec chown root.wheel %D/var/run/procstates && chmod 1775 %D/var/run/procstates
[nitpick: you should use chown root:wheel]
|
| The rationale for each line:
| - 1 Install: make sure that the directory exists, avoiding error messages
| if an earlier instance of the package is on the machine.
Just curious, but isn't this a bit redundant? mkdir -p will never
return an error, so you don't have to worry if the directory already
exists.
| - 2 Install: make sure directory has correct permissions.
|
| For some reason, there are machines where the package is added, but
| /var/run/procstates does not get created. pkg_add has no complaints.
I did a real quick test, and noticed the same thing. But like I said
above, just @exec mkdir -p should do the trick in this case.
-pete
--
Pete Fritchman <[EMAIL PROTECTED]>
Databits Network Services, Inc. <http://databits.net>
finger [EMAIL PROTECTED] for PGP key
To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message