On Sun, 11 May 2014, Marc Haber wrote: > On Sat, 10 May 2014 22:13:01 +0200, Matthias Urlichs > <matth...@urlichs.de> wrote: > >I also would not expect an "end user" to add "su foo -c /do/whatever" to > >/etc/rc.local. Your opinion may differ, that's OK. > > Especially people who are not as Debian-centric as we are tend to do > exactly this. Simply because they don't know any better.
I’ve been doing so for ages, from a BSD PoV (not su -l though¹). Sometimes su -c, sometimes chroot, sometimes both, rarely dchroot. But so are my coworkers who are *not* experienced with BSD. I’ve barely (not even completely) got our admins and systems running Debian/LSB init scripts by now. Piling even more change on top of what is currently needed for administration (ever since insserv…) will not work; people will end with partially broken systems and blame Debian and go back to use CentOS 5… On Sun, 11 May 2014, Cyril Brulebois wrote: > Marc Haber <mh+debian-de...@zugschlus.de> (2014-05-11): > > Just curious as the maintainer of another package using su in an init > > script since 2001, how am I supposed to start a non-root process from > > an init script? > > start-stop-daemon has: > > -c, --chuid username|uid[:group|gid] But the start-stop-daemon documentation seems to imply (please correct me if I’m wrong) that it’s for starting (and stopping) specific executables, as dæmons, with pidfiles, etc. – not for just running some shell code (which may or may not start other processes and/or dæmons) as another user. Taking dirmngr as example again: output=$(su -c ". /lib/lsb/init-functions && umask 027 && start_daemon -p $PIDFILE $DAEMON --daemon --sh" dirmngr) || return 1 eval "$output" || return 1 Before preparing the NMU¹, I searched long and wide for something using start-stop-daemon which could replace this piece of code, and found it not. ① Note I did NMU dirmngr to remove the -l from the su call, which was causing problems. bye, //mirabilos -- «MyISAM tables -will- get corrupted eventually. This is a fact of life. » “mysql is about as much database as ms access” – “MSSQL at least descends from a database” “it's a rebranded SyBase” “MySQL however was born from a flatfile and went downhill from there” – “at least jetDB doesn’t claim to be a database” ‣‣‣ Please, http://deb.li/mysql and MariaDB, finally die! -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org Archive: https://lists.debian.org/alpine.deb.2.10.1405121316410.25...@tglase.lan.tarent.de