mass update from my home pc
This commit is contained in:
parent
acdcc82461
commit
b5ebe89685
4
init.d/agetty-tty8
Executable file
4
init.d/agetty-tty8
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env watchman
|
||||
|
||||
service_command='/bin/agetty'
|
||||
service_args="38400 ${service_name##*-} linux"
|
|
@ -2,12 +2,11 @@
|
|||
|
||||
unset reload
|
||||
|
||||
service_username='cjdns'
|
||||
service_command='/usr/local/sbin/cjdroute'
|
||||
|
||||
cjdroute_config='/etc/cjdroute.conf'
|
||||
cjdroute_tun_interface='cjdns0'
|
||||
cjdroute_listen_port=''
|
||||
cjdroute_listen_port='7530'
|
||||
|
||||
service_pid=`lsof -i :"$cjdroute_listen_port" | tail -1 | cut -d ' ' -f 2`
|
||||
|
||||
|
|
|
@ -5,7 +5,6 @@ service_type='oneshot'
|
|||
cfg_mounts+=( 'dev:devtmpfs:defaults:/dev' )
|
||||
cfg_mounts+=( '/dev/pts:devpts:noexec,nosuid,gid=5,mode=0620:/dev/pts' )
|
||||
cfg_mounts+=( '/dev/mqueue:mqueue:noexec,nosuid,nodev:/dev/mqueue' )
|
||||
cfg_mounts+=( '/dev/pts:devpts:noexec,nosuid,gid=5,mode=0620:/dev/pts' )
|
||||
cfg_mounts+=( 'tmpfs:tmpfs:defaults,mode=0777:/dev/shm' )
|
||||
|
||||
start() {
|
||||
|
|
|
@ -1,8 +1,6 @@
|
|||
#!/usr/bin/env watchman
|
||||
# dhcp client daemon initscript
|
||||
|
||||
depends network
|
||||
|
||||
service_command='/usr/sbin/dhcpcd'
|
||||
service_args='-q -C resolv.conf'
|
||||
service_pidfile='/var/run/dhcpcd.pid'
|
||||
|
|
7
init.d/ipt
Executable file
7
init.d/ipt
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env watchman
|
||||
|
||||
service_type='oneshot'
|
||||
service_command='/usr/local/sbin/ipt'
|
||||
service_args="$cfg_hostname"
|
||||
|
||||
stop() { "$service_command" clean; }
|
|
@ -1,5 +1,7 @@
|
|||
#!/usr/bin/env watchman
|
||||
|
||||
depends devfs
|
||||
|
||||
service_command='/usr/local/sbin/mdev'
|
||||
service_rgs='-s'
|
||||
|
||||
|
|
|
@ -7,6 +7,7 @@ service_type='oneshot'
|
|||
start() {
|
||||
[[ -w / ]] || { mount -o remount,rw /; }
|
||||
mount -a
|
||||
swapon -a
|
||||
}
|
||||
|
||||
unset stop
|
||||
|
|
62
init.d/net-auto-wired
Executable file
62
init.d/net-auto-wired
Executable file
|
@ -0,0 +1,62 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
. /usr/lib/network/globals
|
||||
. /etc/conf.d/netcfg
|
||||
|
||||
if [[ ! -x /usr/bin/ifplugd ]]; then
|
||||
exit_stderr "Please install 'ifplugd' to use net-auto-wired"
|
||||
fi
|
||||
|
||||
if [[ -z "${WIRED_INTERFACE}" ]]; then
|
||||
exit_stderr "No interface name set. Add to /etc/conf.d/netcfg a line"$'\n' \
|
||||
" WIRED_INTERFACE='your_interface'"
|
||||
fi
|
||||
|
||||
CFG=/etc/ifplugd/ifplugd.conf
|
||||
ACTION=/etc/ifplugd/netcfg.action
|
||||
PIDFILE=/var/run/ifplugd.$WIRED_INTERFACE.pid
|
||||
[[ -f $PIDFILE ]] && read PID < $PIDFILE
|
||||
|
||||
# Source ifplugd configuration
|
||||
[ -f $CFG ] && . $CFG
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if ! ck_daemon net-auto-wired; then
|
||||
exit_stderr "net-auto-wired has already been started: try \"/etc/rc.d/net-auto-wired restart\""
|
||||
fi
|
||||
stat_busy "Starting netcfg auto-wired mode for interface ${WIRED_INTERFACE}"
|
||||
A="`eval echo \$\{ARGS_${WIRED_INTERFACE}\}`"
|
||||
[[ "$A" ]] || A="$ARGS"
|
||||
[[ "$PID" ]] || /usr/bin/ifplugd -i $WIRED_INTERFACE -r $ACTION $A
|
||||
# ifplugd may return non-zero, but still succeed if -w is passed, as default in upstream config.
|
||||
sleep 1
|
||||
if [[ -f $PIDFILE ]]; then
|
||||
add_daemon net-auto-wired
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if ! ck_daemon net-auto-wired; then
|
||||
stat_busy "Stopping netcfg auto-wired mode for interface ${WIRED_INTERFACE}"
|
||||
if [[ "$PID" ]] && /usr/bin/ifplugd -k -i $WIRED_INTERFACE -r $ACTION; then
|
||||
rm_daemon net-auto-wired
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
"$0" stop
|
||||
sleep 1
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
esac
|
||||
exit 0
|
61
init.d/net-auto-wireless
Executable file
61
init.d/net-auto-wireless
Executable file
|
@ -0,0 +1,61 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
. /usr/lib/network/globals
|
||||
. /etc/conf.d/netcfg
|
||||
|
||||
if [[ ! -x /usr/sbin/wpa_actiond ]]; then
|
||||
exit_stderr "Please install 'wpa_actiond' to use net-auto-wireless"
|
||||
fi
|
||||
|
||||
if [[ -z "${WIRELESS_INTERFACE}" ]]; then
|
||||
exit_stderr "No interface name set. Add to /etc/conf.d/netcfg a line"$'\n' \
|
||||
" WIRELESS_INTERFACE='your_interface'"
|
||||
fi
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if ! ck_daemon net-auto-wireless; then
|
||||
exit_stderr "net-auto-wireless has already been started: try \"/etc/rc.d/net-auto-wireless restart\""
|
||||
fi
|
||||
# Ensure any device renaming has occurred as intended
|
||||
for daemon in "${DAEMONS[@]}"; do
|
||||
if [[ "$daemon" = "net-rename" ]]; then
|
||||
if ck_daemon net-rename; then
|
||||
/etc/rc.d/net-rename start
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
stat_busy "Starting netcfg auto-wireless mode for interface ${WIRELESS_INTERFACE}"
|
||||
if /usr/bin/netcfg-wpa_actiond "${WIRELESS_INTERFACE}" >/dev/null; then
|
||||
add_daemon net-auto-wireless
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if ! ck_daemon net-auto-wireless; then
|
||||
stat_busy "Stopping netcfg auto-wireless mode for interface ${WIRELESS_INTERFACE}"
|
||||
if /usr/bin/netcfg-wpa_actiond stop "${WIRELESS_INTERFACE}" >/dev/null; then
|
||||
rm_daemon net-auto-wireless
|
||||
stat_done
|
||||
else
|
||||
stat_fail
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
restart)
|
||||
"$0" stop
|
||||
sleep 1
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
exit 0
|
||||
# vim: ft=sh ts=4 et sw=4:
|
55
init.d/net-profiles
Executable file
55
init.d/net-profiles
Executable file
|
@ -0,0 +1,55 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# This script utilizes netcfg-daemon.
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
. /usr/lib/network/globals
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
if ! ck_daemon net-profiles; then
|
||||
exit_stderr "net-profiles has already been started. Try '/etc/rc.d/net-profiles restart'"
|
||||
fi
|
||||
|
||||
# Ensure any device renaming has occurred as intended
|
||||
for daemon in "${DAEMONS[@]}"; do
|
||||
if [[ $daemon = net-rename ]]; then
|
||||
if ck_daemon net-rename; then
|
||||
/etc/rc.d/net-rename start
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
# $NET env var is passed from the kernel boot line
|
||||
if [[ -n $NET ]]; then
|
||||
# Record the connected profile for net-profiles stop
|
||||
if [[ $NET = menu ]]; then
|
||||
/usr/bin/netcfg-menu || exit 1
|
||||
mv "$STATE_DIR"/{menu,netcfg-daemon}
|
||||
else
|
||||
/usr/bin/netcfg check-iface "$NET" || exit 1
|
||||
echo "$NET" > "$STATE_DIR/netcfg-daemon"
|
||||
fi
|
||||
elif ! /usr/bin/netcfg-daemon start; then
|
||||
exit_err "No profile started."
|
||||
fi
|
||||
add_daemon net-profiles
|
||||
;;
|
||||
stop)
|
||||
if ck_daemon net-profiles; then
|
||||
exit_stderr "net-profiles is not running"
|
||||
fi
|
||||
/usr/bin/netcfg-daemon stop
|
||||
rm_daemon net-profiles
|
||||
;;
|
||||
restart)
|
||||
"$0" stop
|
||||
sleep 1
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
exit_stderr "Usage: $0 {start|stop|restart}"
|
||||
esac
|
||||
|
||||
# vim: ft=sh ts=4 et sw=4:
|
28
init.d/net-rename
Executable file
28
init.d/net-rename
Executable file
|
@ -0,0 +1,28 @@
|
|||
#!/bin/bash
|
||||
|
||||
. /etc/rc.conf
|
||||
. /etc/rc.d/functions
|
||||
. /usr/lib/network/globals
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
report_try "Renaming network devices"
|
||||
ifrename -p -t
|
||||
report_success
|
||||
|
||||
add_daemon net-rename
|
||||
;;
|
||||
stop)
|
||||
rm_daemon net-rename
|
||||
# No stop neccesary, but add one to look nice on shutdown.
|
||||
/bin/true
|
||||
;;
|
||||
restart)
|
||||
"$0" start
|
||||
;;
|
||||
*)
|
||||
exit_stderr "Usage: $0 {start|stop|restart}"
|
||||
;;
|
||||
esac
|
||||
|
||||
# vim: ft=sh ts=4 et sw=4:
|
|
@ -1,10 +1,12 @@
|
|||
#!/usr/bin/env watchman
|
||||
|
||||
service_type='oneshot'
|
||||
service_command='ip'
|
||||
service_args='link set lo up'
|
||||
|
||||
start() {
|
||||
watchman.msg "Activating the loopback interface (lo)..."
|
||||
ip link set lo up
|
||||
watchman.start
|
||||
}
|
||||
|
||||
stop() {
|
||||
|
|
|
@ -2,6 +2,6 @@
|
|||
|
||||
cfg_nrpe_config='/etc/nrpe/nrpe.cfg'
|
||||
|
||||
service_command='/bin/nrpe'
|
||||
service_args="-c $cfg_nrpe_config -d"
|
||||
service_command='/usr/bin/nrpe'
|
||||
service_pidfile='/run/nrpe.pid'
|
||||
service_args=" -c ${cfg_nrpe_config} -d"
|
||||
|
|
7
init.d/openvpn-mh
Executable file
7
init.d/openvpn-mh
Executable file
|
@ -0,0 +1,7 @@
|
|||
#!/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"
|
4
init.d/preload
Executable file
4
init.d/preload
Executable file
|
@ -0,0 +1,4 @@
|
|||
#!/usr/bin/env watchman
|
||||
|
||||
service_command='/bin/preload'
|
||||
service_args='-f'
|
|
@ -1,7 +1,5 @@
|
|||
#!/usr/bin/env watchman
|
||||
|
||||
watchman.depends network
|
||||
|
||||
cfg_sshd_cfgdir='/etc/ssh'
|
||||
|
||||
service_command='/bin/sshd'
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
#!/usr/bin/env watchman
|
||||
|
||||
service_command='/bin/udevd'
|
||||
service_command='/sbin/udevd'
|
||||
# service_args='--resolve-names=never'
|
||||
|
||||
cfg_udev_settle_timeout="${cfg_udev_settle_timeout:-60}"
|
||||
|
||||
watchman.depends devfs
|
||||
depends devfs
|
||||
|
||||
udev.populate_dev() {
|
||||
watchman.msg "Populating /dev with udev..."
|
||||
|
@ -13,6 +14,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() {
|
||||
|
|
Loading…
Reference in New Issue
Block a user