rtld - do not allow both dynamic DTV index and static TLS offset
[dragonfly.git] / etc / rc.d / addswap
blob4b3fd9dcd1e6e3bce4a472b72e073de2ff7f5b89
1 #!/bin/sh
3 # Add additional swap files
5 # $FreeBSD: src/etc/rc.d/addswap,v 1.2 2002/10/12 10:31:31 schweikh Exp $
8 # PROVIDE: addswap
9 # REQUIRE: FILESYSTEMS
10 # BEFORE: LOGIN
12 . /etc/rc.subr
14 name="addswap"
15 start_cmd="addswap_start"
16 stop_cmd=":"
18 addswap_start()
20 case ${swapfile} in
21 [Nn][Oo] | '')
24 if [ -w "${swapfile}" ]; then
25 # load vn kernel module if needed
26 kldstat -qm vn || kldload -n vn || exit 1
27 echo "Adding ${swapfile} as additional swap"
28 vnconfig -e vn0 ${swapfile} swap
31 esac
34 load_rc_config $name
35 run_rc_command "$1"