rc.subr (298515) | rc.subr (299349) |
---|---|
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 298515 2016-04-23 16:19:34Z lme $ | 2# $FreeBSD: head/etc/rc.subr 299349 2016-05-10 08:44:44Z trasz $ |
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 --- 1938 unchanged lines hidden (view full) --- 1949 provider=${provider%.eli} 1950 provider=${provider#/dev/} 1951 devices2="${devices2} ${provider}" 1952 done 1953 1954 echo ${devices2} 1955} 1956 | 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 --- 1938 unchanged lines hidden (view full) --- 1949 provider=${provider%.eli} 1950 provider=${provider#/dev/} 1951 devices2="${devices2} ${provider}" 1952 done 1953 1954 echo ${devices2} 1955} 1956 |
1957# Originally, root mount hold had to be released before mounting 1958# the root filesystem. This delayed the boot, so it was changed 1959# to only wait if the root device isn't readily available. This 1960# can result in rc scripts executing before all the devices - such 1961# as graid(8), or USB disks - can be accessed. This function can 1962# be used to explicitly wait for root mount holds to be released. 1963root_hold_wait() 1964{ 1965 local wait waited holders 1966 1967 waited=0 1968 while true; do 1969 holders="$(sysctl -n vfs.root_mount_hold)" 1970 if [ -z "${holders}" ]; then 1971 break; 1972 fi 1973 if [ ${waited} -eq 0 ]; then 1974 echo -n "Waiting ${root_hold_delay}s" \ 1975 "for the root mount holders: ${holders}" 1976 else 1977 echo -n . 1978 fi 1979 if [ ${waited} -ge ${root_hold_delay} ]; then 1980 echo 1981 break 1982 fi 1983 sleep 1 1984 waited=$(($waited + 1)) 1985 done 1986} 1987 |
|
1957# Find scripts in local_startup directories that use the old syntax 1958# 1959find_local_scripts_old() { 1960 zlist='' 1961 slist='' 1962 for dir in ${local_startup}; do 1963 if [ -d "${dir}" ]; then 1964 for file in ${dir}/[0-9]*.sh; do --- 175 unchanged lines hidden --- | 1988# Find scripts in local_startup directories that use the old syntax 1989# 1990find_local_scripts_old() { 1991 zlist='' 1992 slist='' 1993 for dir in ${local_startup}; do 1994 if [ -d "${dir}" ]; then 1995 for file in ${dir}/[0-9]*.sh; do --- 175 unchanged lines hidden --- |