diff options
author | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2017-08-02 09:11:47 -0400 |
---|---|---|
committer | Dee'Kej <deekej@linuxmail.org> | 2017-08-03 13:47:59 +0200 |
commit | b119d37d1929a09e25bf288d0273aaaf8c7de86e (patch) | |
tree | 4d9105321a1959c37bd7450394423ebf8b46d8bb /Makefile | |
parent | bf00a00483cfa675ea665d6a0dd40d5629bc928a (diff) | |
download | initscripts-b119d37d1929a09e25bf288d0273aaaf8c7de86e.tar initscripts-b119d37d1929a09e25bf288d0273aaaf8c7de86e.tar.gz initscripts-b119d37d1929a09e25bf288d0273aaaf8c7de86e.tar.bz2 initscripts-b119d37d1929a09e25bf288d0273aaaf8c7de86e.tar.xz initscripts-b119d37d1929a09e25bf288d0273aaaf8c7de86e.zip |
Makefile: replace /var/run with /run
Do not create anything under /run when $(ROOT) is non-empty: when
we're installing into a chroot /run might not be mounted, and
creating files there is counterproductive.
Diffstat (limited to 'Makefile')
-rw-r--r-- | Makefile | 10 |
1 files changed, 7 insertions, 3 deletions
@@ -61,9 +61,13 @@ install: make install ROOT=$(ROOT) mandir=$(mandir) -C src make install PREFIX=$(ROOT) -C po - mkdir -p $(ROOT)/var/run/netreport $(ROOT)/var/log - chown $(SUPERUSER):$(SUPERGROUP) $(ROOT)/var/run/netreport - chmod u=rwx,g=rwx,o=rx $(ROOT)/var/run/netreport + mkdir -p $(ROOT)/var/log + if -z "$(ROOT)"; then \ + # do not touch /run if installing into a chroot + mkdir -p $(ROOT)/run/netreport; \ + chown $(SUPERUSER):$(SUPERGROUP) $(ROOT)/run/netreport; \ + chmod u=rwx,g=rwx,o=rx $(ROOT)/run/netreport; \ + fi for i in 0 1 2 3 4 5 6 ; do \ dir=$(ROOT)/etc/rc.d/rc$$i.d; \ |