8801556beb
systems are fully "ready to go". 'FILESYSTEMS' states: "This is a dummy dependency, for services which require file systems to be mounted before starting." However, we have 'var' which is was run after 'FILESYSTEMS' and can mount /var if it already isn't mounted. Furthermore, several scripts cannot use /var until 'cleanvar' has done its thing. Thus "FILESYSTEMS" hasn't really meant all critical file systems are fully usable.
35 lines
483 B
Bash
Executable File
35 lines
483 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Add additional swap files
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: addswap
|
|
# REQUIRE: FILESYSTEMS kld
|
|
# BEFORE: netif
|
|
# KEYWORD: nojail
|
|
|
|
. /etc/rc.subr
|
|
|
|
name="addswap"
|
|
start_cmd="addswap_start"
|
|
stop_cmd=":"
|
|
|
|
addswap_start()
|
|
{
|
|
case ${swapfile} in
|
|
[Nn][Oo] | '')
|
|
;;
|
|
*)
|
|
if [ -w "${swapfile}" ]; then
|
|
echo "Adding ${swapfile} as additional swap"
|
|
mdev=`mdconfig -a -t vnode -f ${swapfile}` && swapon /dev/${mdev}
|
|
fi
|
|
;;
|
|
esac
|
|
}
|
|
|
|
load_rc_config $name
|
|
run_rc_command "$1"
|