📄 rc_voudpd
字号:
#!/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 + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -