rc_voudpd
来自「voudp - VoIP for NetBSD」· 代码 · 共 45 行
TXT
45 行
#!/bin/sh# PROVIDE: voudpd# REQUIRE: NETWORKING. /etc/rc.subrname="voudpd"rcvar=$namecommand="/usr/local/sbin/${name}"setvar "${name}_nice" "-20"my_confdir="/etc/${name}"my_chrootdir="/var/chroot/${name}"start_postcmd=my_postcmdstart_precmd=my_precmdmy_precmd(){ mkdir -p "${my_chrootdir}/etc" chown root:wheel "$my_chrootdir" chmod 755 "$my_chrootdir" chown root:wheel "${my_chrootdir}/etc" chmod 755 "${my_chrootdir}/etc" cp -f /etc/nsswitch.conf /etc/hosts /etc/resolv.conf "${my_chrootdir}/etc"}my_postcmd(){ if [ ! -d "$my_confdir" ] || [ ! -r "$my_confdir" ] || [ ! -x "$my_confdir" ]; then if [ -e "$my_confdir" ]; then echo "Cannot use configuration directory $my_confdir" return 1 fi return 0 fi for f in "$my_confdir"/* ; do r=`basename "$f"` echo Reading configuration for recipient \'$r\' /usr/local/bin/voudpconfig "$r" `cat "$f"` done}load_rc_config $namerun_rc_command "$1"
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?