Codebase list openrc / 54ab12d
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
4 changed file(s) with 24 addition(s) and 29 deletion(s). Raw diff Collapse all Expand all
00 functions.sh
11 gendepends.sh
2 init-common-post.sh
32 rc-functions.sh
43 runscript.sh
54 cgroup-release-agent.sh
00 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 \
22 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
44 BIN= gendepends.sh init.sh runscript.sh tmpfiles.sh ${BIN-${OS}}
55
66 INSTALLAFTER= _installafter
+0
-25
sh/init-common-post.sh.in less more
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
2828 sysctl hw.bus.devctl_disable=1 >/dev/null
2929 fi
3030
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