Adopt a more C style for scripts and remove vim settings.

This commit is contained in:
Roy Marples
2008-01-11 12:13:46 +00:00
parent 1f4422c72f
commit 3bf49a9bd1
38 changed files with 264 additions and 213 deletions

View File

@@ -2,11 +2,13 @@
# Copyright 2007-2008 Roy Marples
# All rights reserved
has_addon() {
has_addon()
{
[ -e "${RC_LIBDIR}/addons/$1.sh" ] || [ -e /lib/rcscripts/addons/"$1".sh ]
}
import_addon() {
import_addon()
{
if [ -e "${RC_LIBDIR}/addons/$1.sh" ]; then
. "${RC_LIBDIR}/addons/$1.sh"
elif [ -e /lib/rcscripts/addons/"$1".sh ]; then
@@ -16,16 +18,19 @@ import_addon() {
fi
}
start_addon() {
start_addon()
{
( import_addon "$1-start" )
}
stop_addon() {
stop_addon()
{
( import_addon "$1-stop" )
}
net_fs_list="afs cifs coda davfs fuse gfs ncpfs nfs nfs4 ocfs2 shfs smbfs"
is_net_fs() {
is_net_fs()
{
[ -z "$1" ] && return 1
# Check OS specific flags to see if we're local or net mounted
@@ -40,12 +45,14 @@ is_net_fs() {
return 1
}
is_union_fs() {
is_union_fs()
{
[ ! -x /sbin/unionctl ] && return 1
unionctl "$1" --list >/dev/null 2>&1
}
get_bootparam() {
get_bootparam()
{
local match="$1"
[ -z "${match}" -o ! -r /proc/cmdline ] && return 1
@@ -71,5 +78,3 @@ case "${PATH}" in
/lib/rc/sbin|/lib/rc/sbin:*);;
*) export PATH="/lib/rc/sbin:${PATH}";;
esac
# vim: set ts=4 :