mirror of
https://git.FreeBSD.org/src.git
synced 2024-12-03 09:00:21 +00:00
5d595cb88e
- Add rc.d/stf and rc.d/faith for stf(4) and faith(4). - Remove rc.d/auto_linklocal and rc.d/network_ipv6. - Move rc.d/sysctl to just before FILESYSTEMS because rc.d/netif depends on some sysctl variables. Reviewed by: brooks MFC after: 3 days
34 lines
462 B
Bash
Executable File
34 lines
462 B
Bash
Executable File
#!/bin/sh
|
|
#
|
|
# Add additional swap files
|
|
#
|
|
# $FreeBSD$
|
|
#
|
|
|
|
# PROVIDE: addswap
|
|
# REQUIRE: FILESYSTEMS
|
|
# 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"
|