mirror of
https://notabug.org/Sages-of-Gensokyo/gensokyo_kappa-overlay
synced 2025-01-19 05:41:13 +01:00
ff9ef16c55
-Added files needed for openRC support. (init scripts and configuration files) -Updated ebuild to install them. TODO: do not install openRC support files if systemD USE flag is set. This will probably never be done because if you are crasy enough to use systemD, you should use other ebuilds you can find on internet. (And i don't care about systemD)
30 lines
766 B
Plaintext
30 lines
766 B
Plaintext
#!/sbin/openrc-run
|
|
|
|
depend() {
|
|
need localmount
|
|
after consolekit
|
|
after bootmisc
|
|
use logger
|
|
provide usb-access-control
|
|
provide usbguard
|
|
}
|
|
|
|
start_pre() {
|
|
ebegin "Pre-start security checks for usbguard"
|
|
checkpath --directory --owner root:root /etc/usbguard/
|
|
checkpath --file --owner root:root --mode 0600 /etc/usbguard/usbguard-daemon.conf /etc/usbguard/rules.conf
|
|
eend $?
|
|
}
|
|
|
|
start() {
|
|
ebegin "Starting usbguard daemon"
|
|
start-stop-daemon --start --pidfile /var/run/usbguard.pid --exec /usr/sbin/usbguard-daemon -- -f -s -K $APPEND
|
|
eend $?
|
|
}
|
|
|
|
stop() {
|
|
ebegin "Stopping usbguard daemon"
|
|
start-stop-daemon --stop --pidfile /var/run/usbguard.pid --exec /usr/sbin/usbguard-daemon -- -f -s -K $APPEND
|
|
eend $?
|
|
}
|