mirror of
https://github.com/void-linux/void-packages.git
synced 2025-06-05 22:53:51 +02:00
parent
3b9cc95ac4
commit
08d8832079
2 changed files with 4 additions and 49 deletions
|
@ -1,44 +0,0 @@
|
||||||
#compdef sv
|
|
||||||
|
|
||||||
# completion for runit sv(1)
|
|
||||||
# Leah Neukirchen <leah@vuxu.org>
|
|
||||||
# runit 2.1.1, services in /var/service are completed by default
|
|
||||||
|
|
||||||
local ret=1 services
|
|
||||||
|
|
||||||
_arguments \
|
|
||||||
'-v[verbose]' \
|
|
||||||
'-w[wait]:seconds' \
|
|
||||||
'1: :->cmds' \
|
|
||||||
'*:: :->args' && ret=0
|
|
||||||
|
|
||||||
case $state in
|
|
||||||
cmds)
|
|
||||||
_values "sv command" \
|
|
||||||
status \
|
|
||||||
up \
|
|
||||||
down \
|
|
||||||
once \
|
|
||||||
pause cont hup alarm interrupt quit 1 2 term kill \
|
|
||||||
exit
|
|
||||||
# above allow one-character shortcuts, complete these
|
|
||||||
[[ $words[CURRENT] = [sudopchaiq12tke] ]] ||
|
|
||||||
_values "sv command" \
|
|
||||||
start \
|
|
||||||
stop \
|
|
||||||
restart \
|
|
||||||
shutdown \
|
|
||||||
force-stop \
|
|
||||||
force-reload \
|
|
||||||
force-restart \
|
|
||||||
force-shutdown \
|
|
||||||
check
|
|
||||||
ret=0;;
|
|
||||||
args)
|
|
||||||
services=( /var/service/*(-/N:t) )
|
|
||||||
(( $#services )) && _values services $services && ret=0
|
|
||||||
[[ $words[CURRENT] = */* ]] && _directories && ret=0
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
return $ret
|
|
|
@ -8,7 +8,7 @@ short_desc="UNIX init scheme with service supervision"
|
||||||
maintainer="Orphaned <orphan@voidlinux.org>"
|
maintainer="Orphaned <orphan@voidlinux.org>"
|
||||||
license="BSD-3-Clause"
|
license="BSD-3-Clause"
|
||||||
homepage="http://smarden.org/runit/"
|
homepage="http://smarden.org/runit/"
|
||||||
distfiles="http://smarden.org/runit/runit-$version.tar.gz"
|
distfiles="http://smarden.org/runit/runit-${version}.tar.gz"
|
||||||
checksum=6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18
|
checksum=6fd0160cb0cf1207de4e66754b6d39750cff14bb0aa66ab49490992c0c47ba18
|
||||||
patch_args=-Np0
|
patch_args=-Np0
|
||||||
# FIXME: this is caused by some bonk tests that should be fixed in void-linux/runit at some point
|
# FIXME: this is caused by some bonk tests that should be fixed in void-linux/runit at some point
|
||||||
|
@ -22,14 +22,14 @@ if [ "$build_option_static" ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pre_build() {
|
pre_build() {
|
||||||
sed -e 's,sbin/runit,usr/bin/runit,g' -i runit.h
|
vsed -e 's,sbin/runit,usr/bin/runit,g' -i runit.h
|
||||||
|
|
||||||
echo "$CC -D_GNU_SOURCE $CFLAGS" >conf-cc
|
echo "$CC -D_GNU_SOURCE $CFLAGS" >conf-cc
|
||||||
echo "$CC $LDFLAGS -Wl,-z -Wl,noexecstack" >conf-ld
|
echo "$CC $LDFLAGS -Wl,-z -Wl,noexecstack" >conf-ld
|
||||||
# set default service path to /var/service
|
# set default service path to /var/service
|
||||||
sed -i -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' sv.c
|
vsed -e 's:^char \*varservice ="/service/";$:char \*varservice ="/var/service/";:' -i sv.c
|
||||||
# change type short to gid_t for getgroups(2) and setgroups(2)
|
# change type short to gid_t for getgroups(2) and setgroups(2)
|
||||||
sed -i -e 's:short x\[4\];$:gid_t x[4];:' chkshsgr.c
|
vsed -e 's:short x\[4\];$:gid_t x[4];:' -i chkshsgr.c
|
||||||
}
|
}
|
||||||
|
|
||||||
do_install() {
|
do_install() {
|
||||||
|
@ -50,6 +50,5 @@ do_install() {
|
||||||
vman $f
|
vman $f
|
||||||
done
|
done
|
||||||
|
|
||||||
vinstall ${FILESDIR}/_sv 644 usr/share/zsh/site-functions
|
|
||||||
vinstall ${FILESDIR}/sv 644 usr/share/bash-completion/completions
|
vinstall ${FILESDIR}/sv 644 usr/share/bash-completion/completions
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue