Deleted Added
full compact
rc.subr (220962) rc.subr (220963)
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 220962 2011-04-23 04:26:31Z dougb $
2# $FreeBSD: head/etc/rc.subr 220963 2011-04-23 05:24:17Z 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

--- 383 unchanged lines hidden (view full) ---

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{
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

--- 383 unchanged lines hidden (view full) ---

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 if [ -z "$1" -o -z "$2" ]; then
403 err 3 "USAGE: get_pidfile_from_conf string file ($name)"
404 fi
405
402 local string file line
403
404 string="$1" ; file="$2"
405
406 local string file line
407
408 string="$1" ; file="$2"
409
406 if [ -z "$string" -o -z "$file" ] || [ ! -s "$file" ]; then
407 err 3 'USAGE: get_pidfile_from_conf string file'
410 if [ ! -s "$file" ]; then
411 err 3 "get_pidfile_from_conf: $file does not exist ($name)"
408 fi
409
410 while read line; do
411 case "$line" in
412 *[#\;]*${string}*) continue ;;
413 *${string}*) break ;;
414 esac
415 done < $file

--- 1341 unchanged lines hidden ---
412 fi
413
414 while read line; do
415 case "$line" in
416 *[#\;]*${string}*) continue ;;
417 *${string}*) break ;;
418 esac
419 done < $file

--- 1341 unchanged lines hidden ---