On Fri, Aug 13, 2010 at 12:17 PM, Mike Frysinger wrote: > for people who do wish to improve their init.d scripts, recreating a > dir is easy if your init.d runs after localmount: > [ ! -d /var/run/foo ] && install -d -m 755 -o fowner -g fgroup /var/run/foo
oh, and for the very few cases that need to create a file with specific ownership ahead of time (because their daemon sucks and doesnt drop root properly), then you can do: install -m 644 -o fowner -g fgroup /dev/null /var/run/foo-file -mike