initial import

This commit is contained in:
2025-06-22 20:39:04 -05:00
commit f8a70886f0
3428 changed files with 302546 additions and 0 deletions

31
nbd/nbd-client.initd Normal file
View File

@@ -0,0 +1,31 @@
#!/sbin/openrc-run
# Copyright 2022 Hyperbola Project
# Distributed under the terms of the GNU General Public License v2
depend() {
before 'cron' 'portmap'
after 'net' 'openvpn'
use 'dns' 'logger'
}
checkconfig() {
if ! type nbd-client > '/dev/null' 2>&1; then
eerror 'Please edit /etc/conf.d/nbd-client'
eerror "Unable to locate the client command ${NBDCLIENT_CMD}!"
return '1'
fi
if [ -z "${NBDCLIENT_OPTS}" ]; then
eerror 'Please edit /etc/conf.d/nbd-client'
eerror 'I need to know what server/options to use!'
return '1'
fi
return '0'
}
start() {
checkconfig || return "${?}"
ebegin "Setting the NBD client '${NBDCLIENT_CMD}'"
nbd-client "${NBDCLIENT_OPTS}"
eend "${?}" 'Failed to setup'
}