blob: eaedc631f6fa93643f33b42e9778dfa0d1a8da08 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#!@SHELL@
sourcex()
{
if [ "$1" = "-e" ]; then
shift
[ -e "$1" ] || return 1
fi
if ! . "$1"; then
eerror "$RC_SVCNAME: error loading $1"
exit 1
fi
}
_sysconf="${XDG_CONFIG_HOME:-${HOME}/.config}/openrc"
sourcex -e "@SYSCONFDIR@/rc.conf"
sourcex -e "$_sysconf/rc.conf"
case $1 in
start) _runlevel="${rc_user_runlevel:-default}";;
stop) _runlevel="${rc_user_shutdown_runlevel:-none}";;
*) exit 1
esac
mkdir -p "$_sysconf/runlevels/$_runlevel"
openrc --user "$_runlevel"
|