Permalink
Browse files

implement migration of S17procps

Signed-off-by: Nico Schottelius <nico@ikn.schottelius.org>
  • Loading branch information...
1 parent 8d7a642 commit 0e73fe3df73049344f25580a61671eb9a30117b1 Nico Schottelius committed Oct 5, 2009
Showing with 26 additions and 7 deletions.
  1. +3 −1 bin/cinit-conf.migrate.upstart.ubuntu.jaunty
  2. +23 −6 bin/cinit-conf.svc.sysctl.linux
View
4 bin/cinit-conf.migrate.upstart.ubuntu.jaunty
@@ -66,7 +66,9 @@ cinit-conf.svc.mount.dev-pts
# S13pcmciautils: ignored
# S15module-init-tools: not migrated: I think modules should be put into services
-# S17procps:
+# S17procps: migrated
+cinit-conf.svc.sysctl.linux
+
# S20checkroot.sh
# S22mtab.sh
# S25brltty
View
29 bin/cinit-conf.svc.sysctl.linux
@@ -26,21 +26,38 @@
. "$(dirname $0)/cinit-conf.read-conf"
+################################################################################
+# standard vars stolen from cconf
+__pwd="$(pwd -P)"
+__mydir="${0%/*}"; __abs_mydir="$(cd "$__mydir" && pwd -P)"
+__myname=${0##*/}; __abs_myname="$__abs_mydir/$__myname"
+
set -e
if [ $# -ne 0 ]; then
echo "$(basename $0) (no args)"
exit 1
fi
+SVC="local-tuning/sysctl"
+BINARY_PATH="$(which sysctl)"
-
-SVC="mount/dev-shm"
-BINARY_PATH="$(which mount)"
-
+# main service
+cinit-conf.svc-delete "${SVC}"
cinit-conf.svc-create.template "${SVC}"
cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
-cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-n" "-t" "tmpfs" "-onosuid,nodev" "shmfs" "/dev/shm"
-cinit-conf.svc.dependency.add "${SVC}" "needs" "mount/udev"
+cinit-conf.svc-param.add "${SVC}" "${C_ON}" "-p" "/etc/sysctl.conf"
+
+# create "sub"-services
+for file in /etc/sysctl.d/*.conf; do
+ bsvc="${file##*/}"
+ bsvc="${bsvc%*.conf}"
+ svc="${SVC}/${bsvc}"
+
+ cinit-conf.svc-create.template "${svc}"
+ cinit-conf.svc-on "${SVC}" "${BINARY_PATH}"
+ cinit-conf.svc-param.add "${svc}" "${C_ON}" "-p" "${file}"
+ cinit-conf.svc.dependency.add "${SVC}" "needs" "${svc}"
+done
exit 0

0 comments on commit 0e73fe3

Please sign in to comment.