From 99533f46c0d33a9e7a069cf800e95e79cfa556a6 Mon Sep 17 00:00:00 2001 From: fbt Date: Fri, 4 Apr 2014 15:40:00 +0400 Subject: [PATCH] local configuration should be separate --- init.d/cjdroute | 5 ++--- init.d/dhcpcd | 3 ++- init.d/openvpn-mh | 7 ------- init.d/sshd | 2 ++ init.d/udev | 4 ++-- 5 files changed, 8 insertions(+), 13 deletions(-) delete mode 100755 init.d/openvpn-mh diff --git a/init.d/cjdroute b/init.d/cjdroute index e4d43da..a9cdab4 100755 --- a/init.d/cjdroute +++ b/init.d/cjdroute @@ -3,10 +3,9 @@ unset reload service_command='/usr/bin/cjdroute' - cjdroute_config='/etc/cjdroute.conf' -cjdroute_tun_interface='cjdns0' -cjdroute_listen_port='7530' + +source "${cfg_dir}/conf.d/cjdroute.sh" service_pid=`lsof -i :"$cjdroute_listen_port" | tail -1 | cut -d ' ' -f 2` diff --git a/init.d/dhcpcd b/init.d/dhcpcd index 69053b5..ba522b6 100755 --- a/init.d/dhcpcd +++ b/init.d/dhcpcd @@ -2,5 +2,6 @@ # dhcp client daemon initscript service_command='/usr/sbin/dhcpcd' -service_args='-q -C resolv.conf' service_pidfile='/var/run/dhcpcd.pid' + +source "${cfg_dir}/conf.d/dhcpcd.sh" diff --git a/init.d/openvpn-mh b/init.d/openvpn-mh deleted file mode 100755 index ea0c0a1..0000000 --- a/init.d/openvpn-mh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env watchman - -cfg_ovpn_instance="${service_name##*-}" - -service_command="/usr/sbin/openvpn" -service_workdir="/etc/openvpn/$cfg_ovpn_instance" -service_args="client.cfg" diff --git a/init.d/sshd b/init.d/sshd index ab0e6ce..8ea5322 100755 --- a/init.d/sshd +++ b/init.d/sshd @@ -10,3 +10,5 @@ sshd_genkeys() { [[ -e "/etc/ssh/ssh_host_key" ]] || { ssh-keygen -A; } watchman.start } + +start() { sshd_genkeys; } diff --git a/init.d/udev b/init.d/udev index 4377c22..69ce9d4 100755 --- a/init.d/udev +++ b/init.d/udev @@ -1,7 +1,6 @@ #!/usr/bin/env watchman -service_command='/sbin/udevd' -# service_args='--resolve-names=never' +source "${cfg_dir}/conf.d/udev.sh" cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}" @@ -14,6 +13,7 @@ udev.populate_dev() { watchman.msg "Waiting for uevents..." udevadm settle --timeout=${cfg_udev_settle_timeout} + udevadm control --property=do_not_run_plug_service= } start() {