Merge init-common-post code into BSD init script
This code is no longer part of the initialization script for Linux, so
we can move it into the init script for *BSD which is the only place it
is used.
William Hubbs
10 years ago
0 | 0 |
functions.sh
|
1 | 1 |
gendepends.sh
|
2 | |
init-common-post.sh
|
3 | 2 |
rc-functions.sh
|
4 | 3 |
runscript.sh
|
5 | 4 |
cgroup-release-agent.sh
|
0 | 0 |
DIR= ${LIBEXECDIR}/sh
|
1 | |
SRCS= init.sh.in functions.sh.in gendepends.sh.in init-common-post.sh.in \
|
|
1 |
SRCS= init.sh.in functions.sh.in gendepends.sh.in \
|
2 | 2 |
rc-functions.sh.in runscript.sh.in tmpfiles.sh.in ${SRCS-${OS}}
|
3 | |
INC= init-common-post.sh rc-mount.sh functions.sh rc-functions.sh
|
|
3 |
INC= rc-mount.sh functions.sh rc-functions.sh
|
4 | 4 |
BIN= gendepends.sh init.sh runscript.sh tmpfiles.sh ${BIN-${OS}}
|
5 | 5 |
|
6 | 6 |
INSTALLAFTER= _installafter
|
0 | |
# Copyright (c) 2007-2009 Roy Marples <roy@marples.name>
|
1 | |
# Released under the 2-clause BSD license.
|
2 | |
|
3 | |
# mount $RC_SVCDIR as something we can write to if it's not rw
|
4 | |
# On vservers, / is always rw at this point, so we need to clean out
|
5 | |
# the old service state data
|
6 | |
: ${RC_LIBEXECDIR:=@LIBEXECDIR@}
|
7 | |
: ${RC_SVCDIR:=@LIBEXECDIR@/init.d}
|
8 | |
case "$(openrc --sys)" in
|
9 | |
OPENVZ|VSERVER) rm -rf "$RC_SVCDIR"/*;;
|
10 | |
*) if mountinfo --quiet "$RC_SVCDIR"; then
|
11 | |
rm -rf "$RC_SVCDIR"/*
|
12 | |
else
|
13 | |
mount_svcdir
|
14 | |
fi
|
15 | |
;;
|
16 | |
esac
|
17 | |
retval=$?
|
18 | |
|
19 | |
if [ -e "$RC_LIBEXECDIR"/cache/deptree ]; then
|
20 | |
cp -p "$RC_LIBEXECDIR"/cache/* "$RC_SVCDIR" 2>/dev/null
|
21 | |
fi
|
22 | |
|
23 | |
echo sysinit >"$RC_SVCDIR"/softlevel
|
24 | |
exit $retval
|
28 | 28 |
sysctl hw.bus.devctl_disable=1 >/dev/null
|
29 | 29 |
fi
|
30 | 30 |
|
31 | |
. "$RC_LIBEXECDIR"/sh/init-common-post.sh
|
|
31 |
# mount $RC_SVCDIR as something we can write to if it's not rw
|
|
32 |
# On vservers, / is always rw at this point, so we need to clean out
|
|
33 |
# the old service state data
|
|
34 |
: ${RC_LIBEXECDIR:=@LIBEXECDIR@}
|
|
35 |
: ${RC_SVCDIR:=@LIBEXECDIR@/init.d}
|
|
36 |
case "$(openrc --sys)" in
|
|
37 |
OPENVZ|VSERVER) rm -rf "$RC_SVCDIR"/*;;
|
|
38 |
*) if mountinfo --quiet "$RC_SVCDIR"; then
|
|
39 |
rm -rf "$RC_SVCDIR"/*
|
|
40 |
else
|
|
41 |
mount_svcdir
|
|
42 |
fi
|
|
43 |
;;
|
|
44 |
esac
|
|
45 |
retval=$?
|
|
46 |
|
|
47 |
if [ -e "$RC_LIBEXECDIR"/cache/deptree ]; then
|
|
48 |
cp -p "$RC_LIBEXECDIR"/cache/* "$RC_SVCDIR" 2>/dev/null
|
|
49 |
fi
|
|
50 |
|
|
51 |
echo sysinit >"$RC_SVCDIR"/softlevel
|
|
52 |
exit $retval
|