rc.subr (220760) | rc.subr (220962) |
---|---|
1# $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $ | 1# $NetBSD: rc.subr,v 1.67 2006/10/07 11:25:15 elad Exp $ |
2# $FreeBSD: head/etc/rc.subr 220760 2011-04-17 22:31:36Z dougb $ | 2# $FreeBSD: head/etc/rc.subr 220962 2011-04-23 04:26:31Z dougb $ |
3# 4# Copyright (c) 1997-2004 The NetBSD Foundation, Inc. 5# All rights reserved. 6# 7# This code is derived from software contributed to The NetBSD Foundation 8# by Luke Mewburn. 9# 10# Redistribution and use in source and binary forms, with or without --- 368 unchanged lines hidden (view full) --- 379 pwait $_list 2>/dev/null 380 done 381 if [ -n "$_prefix" ]; then 382 echo "." 383 fi 384} 385 386# | 3# 4# Copyright (c) 1997-2004 The NetBSD Foundation, Inc. 5# All rights reserved. 6# 7# This code is derived from software contributed to The NetBSD Foundation 8# by Luke Mewburn. 9# 10# Redistribution and use in source and binary forms, with or without --- 368 unchanged lines hidden (view full) --- 379 pwait $_list 2>/dev/null 380 done 381 if [ -n "$_prefix" ]; then 382 echo "." 383 fi 384} 385 386# |
387# get_pidfile_from_conf string file 388# 389# Takes a string to search for in the specified file. 390# Ignores lines with traditional comment characters. 391# 392# Example: 393# 394# if get_pidfile_from_conf string file; then 395# pidfile="$_pidfile_from_conf" 396# else 397# pidfile='appropriate default' 398# fi 399# 400get_pidfile_from_conf() 401{ 402 local string file line 403 404 string="$1" ; file="$2" 405 406 if [ -z "$string" -o -z "$file" ] || [ ! -s "$file" ]; then 407 err 3 'USAGE: get_pidfile_from_conf string file' 408 fi 409 410 while read line; do 411 case "$line" in 412 *[#\;]*${string}*) continue ;; 413 *${string}*) break ;; 414 esac 415 done < $file 416 417 if [ -n "$line" ]; then 418 line=${line#*/} 419 _pidfile_from_conf="/${line%%[\"\;]*}" 420 else 421 return 1 422 fi 423} 424 425# |
|
387# check_startmsgs 388# If rc_quiet is set (usually as a result of using faststart at 389# boot time) check if rc_startmsgs is enabled. 390# 391check_startmsgs() 392{ 393 if [ -n "$rc_quiet" ]; then 394 checkyesno rc_startmsgs --- 1323 unchanged lines hidden --- | 426# check_startmsgs 427# If rc_quiet is set (usually as a result of using faststart at 428# boot time) check if rc_startmsgs is enabled. 429# 430check_startmsgs() 431{ 432 if [ -n "$rc_quiet" ]; then 433 checkyesno rc_startmsgs --- 1323 unchanged lines hidden --- |