Commonly on most unix systems there is a distinction between $PREFIX/bin
and $PREFIX/sbin
. When installing a piece of software the administrator decides about what $PREFIX
is, but the author decides which programs are suitable for regular users and which are not. With Python's distutils
a set of scripts
can be defined and they are installed to $PREFIX/bin
. So how to install a script to the corresponding sbin directory?
Note that in this case solutions targeting only Linux are welcome, because other parts of the software in question depend on iptables.
You can specify where files should be installed in the data_files parameter. It should work putting '/sbin' in the directory specification:
setup(...,
data_files=[('/sbin', ['rootfill']),
('/etc/init.d', ['init-script'])]
)
For distutils, we are working on support to install scripts into prefix/sbin.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With