Mantis - Resin
Viewing Issue Advanced Details
4152 minor always 08-02-10 07:46 01-11-11 18:20
billa  
ferg  
normal  
closed 4.0.9  
fixed  
none    
none 4.0.13  
0004152: make install fails when /etc/init.d not writable
We do not build Resin as root so /etc/init.d is not writable when we run:

./configure
make
make install

In 4.0.6 "make install" reports a warning but still finishes. But in 4.0.9, "make install" exits with an error.

It will be good if the init.d script feature can be disabled by a command line option in configure, something like --disable-init_d.

Notes
(0004687)
billa   
08-02-10 08:31   
From ./configure:

      init: /etc/init.d/resin

Error from make install:

cp: cannot create regular file `/etc/init.d/resin': Permission denied
chmod: cannot access `/etc/init.d/resin': No such file or directory
make: *** [install] Error 1

The not writable warning is issued only if $(resin_init_d) exits and is a regular file (ie test -f). Otherwise, it just cp and that's where it is failing:

                else \
                        cp $(abs_builddir)/init.d/resin $(resin_init_d); \
                        chmod +x $(resin_init_d) && echo "${resin_init_d} installed."; \
                fi; \
(0004779)
billa   
10-06-10 12:54   
I figured out that I can use --with-resin-init.d=no to get around this.