diff options
author | Eugene Sovetkin | 2015-06-08 11:06:08 +0200 |
---|---|---|
committer | Eugene Sovetkin | 2015-06-08 11:06:08 +0200 |
commit | 05c09af0c87fbcee537ba5c4400acedadf3171d7 (patch) | |
tree | 8af917aeb1e568d0e58d2df2017d83368ac2d0e1 /openswap.install | |
download | aur-05c09af0c87fbcee537ba5c4400acedadf3171d7.tar.gz |
Initial import
Diffstat (limited to 'openswap.install')
-rw-r--r-- | openswap.install | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/openswap.install b/openswap.install new file mode 100644 index 000000000000..db04155fe4cc --- /dev/null +++ b/openswap.install @@ -0,0 +1,26 @@ +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 "miscellaneous=" /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 +}
\ No newline at end of file |