mirror of
https://github.com/tuxdotrs/tuxOS.git
synced 2025-07-08 10:46:34 +05:30
added packages
This commit is contained in:
27
packages/mkinitcpio-openswap/openswap.install
Normal file
27
packages/mkinitcpio-openswap/openswap.install
Normal file
@ -0,0 +1,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
|
||||
}
|
Reference in New Issue
Block a user