Forums

Skip to content

Advanced search
  • Quick links
    • Unanswered topics
    • Active topics
    • Search
  • FAQ
  • Login
  • Register
  • Board index Assistance Other Things Gentoo
  • Search

start-stop-daemon in /sbin?

Still need help with Gentoo, and your question doesn't fit in the above forums? Here is your last bastion of hope.
Post Reply
Advanced search
4 posts • Page 1 of 1
Author
Message
mi_unixbird
Apprentice
Apprentice
User avatar
Posts: 158
Joined: Fri Jul 24, 2015 7:34 pm

start-stop-daemon in /sbin?

  • Quote

Post by mi_unixbird » Sat Sep 26, 2015 4:18 pm

So I've been using start-stop-daemon for a while now to control user-level daemons without root, this goes fine. I was also under the impression that it wasn't a gentoo or otherwise OpenRC thing as googling the manpage gives me an ubuntu page so I assumed that it was a general Unix utility. To my surprise, it sits in /sbin, not just /usr/sbin but /sbin. equery also tells me it belongs to the openrc package. So what's the deal? Why does it sit in /sbin when it seems to require no root rights to run and seems to perform well and why is it part of openrc?
execctl --path exec filectl --current-directory list
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Sat Sep 26, 2015 5:15 pm

mi_unixbird ...

If you look a little closer then you'll see its just a sym-link to /sbin/rc (or /sbin/openrc ... dependent on what version of openrc you're currently using).

Code: Select all

% man start-stop-daemon | less -p HISTORY
man start-stop-daemon wrote:start-stop-daemon first appeared in Debian. This is a complete re-implementation with the process finding code in the OpenRC library (librc, -lrc) so other programs can make use of it.
As to why its in /sbin and not /usr/{,s}bin/ ... its required to bring the system up, and historically we use / rather than /usr as /usr may be a seperate partition.

best ... khay
Top
mi_unixbird
Apprentice
Apprentice
User avatar
Posts: 158
Joined: Fri Jul 24, 2015 7:34 pm

  • Quote

Post by mi_unixbird » Sat Sep 26, 2015 7:34 pm

So why is it in /sbin instead of /bin if it can seemingly be used just fine to start non root daemons?
execctl --path exec filectl --current-directory list
Top
khayyam
Watchman
Watchman
User avatar
Posts: 6227
Joined: Thu Jun 07, 2012 2:45 am
Location: Room 101

  • Quote

Post by khayyam » Sat Sep 26, 2015 7:51 pm

mi_unixbird wrote:So why is it in /sbin instead of /bin if it can seemingly be used just fine to start non root daemons?
mi_unixbird ... because it's not something that a user is generally doing, and so it doesn't make sense to put it in the standard user PATH. There are other binaries in /sbin ... such as lsmod, modinfo, findfs, etc ... that similarly don't require root privilages to run, but are kept seperate none the less. If you want them in your path then you can add /sbin to PATH, or do something like the following (zsh):

Code: Select all

zstyle ':completion:*:sudo:*' environ PATH="$SUDO_PATH:$PATH"

if [[ $EUID != 0 ]] && (($+commands[sudo])) ; then
    typeset -xT SUDO_PATH sudo_path
    typeset -U sudo_path 
    sudo_path=({,/usr/local,/usr}/sbin(N-/))
fi
... or, similarly without sudo ...

Code: Select all

alias start-stop-daemon="/sbin/start-stop-daemon"
best ... khay
Top
Post Reply

4 posts • Page 1 of 1

Return to “Other Things Gentoo”

Jump to
  • Assistance
  • ↳   News & Announcements
  • ↳   Frequently Asked Questions
  • ↳   Installing Gentoo
  • ↳   Multimedia
  • ↳   Desktop Environments
  • ↳   Networking & Security
  • ↳   Kernel & Hardware
  • ↳   Portage & Programming
  • ↳   Gamers & Players
  • ↳   Other Things Gentoo
  • ↳   Unsupported Software
  • Discussion & Documentation
  • ↳   Documentation, Tips & Tricks
  • ↳   Gentoo Chat
  • ↳   Gentoo Forums Feedback
  • ↳   Duplicate Threads
  • International Gentoo Users
  • ↳   中文 (Chinese)
  • ↳   Dutch
  • ↳   Finnish
  • ↳   French
  • ↳   Deutsches Forum (German)
  • ↳   Diskussionsforum
  • ↳   Deutsche Dokumentation
  • ↳   Greek
  • ↳   Forum italiano (Italian)
  • ↳   Forum di discussione italiano
  • ↳   Risorse italiane (documentazione e tools)
  • ↳   Polskie forum (Polish)
  • ↳   Instalacja i sprzęt
  • ↳   Polish OTW
  • ↳   Portuguese
  • ↳   Documentação, Ferramentas e Dicas
  • ↳   Russian
  • ↳   Scandinavian
  • ↳   Spanish
  • ↳   Other Languages
  • Architectures & Platforms
  • ↳   Gentoo on ARM
  • ↳   Gentoo on PPC
  • ↳   Gentoo on Sparc
  • ↳   Gentoo on Alternative Architectures
  • ↳   Gentoo on AMD64
  • ↳   Gentoo for Mac OS X (Portage for Mac OS X)
  • Board index
  • All times are UTC
  • Delete cookies

© 2001–2026 Gentoo Foundation, Inc.

Powered by phpBB® Forum Software © phpBB Limited

Privacy Policy

 

 

magic