blob: 95d59a3d6d32822d790f06e3ae8665f05239345c (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
build ()
{
grep "swap_device=" /etc/openswap.conf > "$BUILDROOT/openswap.conf"
grep "crypt_swap_name=" /etc/openswap.conf >> "$BUILDROOT/openswap.conf"
grep "keyfile_device=" /etc/openswap.conf >> "$BUILDROOT/openswap.conf"
grep "keyfile_filename=" /etc/openswap.conf >> "$BUILDROOT/openswap.conf"
grep "keyfile_device_mount_options=" /etc/openswap.conf >> "$BUILDROOT/openswap.conf"
grep "cryptsetup_options=" /etc/openswap.conf >> "$BUILDROOT/openswap.conf"
source "$BUILDROOT/openswap.conf"
if [ -z "$swap_device" ]; then
warning "swap_device variable is not set"
fi
if [ -z "$crypt_swap_name" ]; then
warning "crypt_swap_name variable is not set"
fi
add_runscript
}
help ()
{
cat<<HELPEOF
This hook opens a swap at boot time
HELPEOF
}
|