mirror of
https://github.com/Kicksecure/security-misc.git
synced 2024-10-01 08:25:45 -04:00
add remount-secure dracut module
This commit is contained in:
parent
f0ee470ecd
commit
e065f85c88
30
usr/lib/dracut/modules.d/20remount-secure/module-setup.sh
Executable file
30
usr/lib/dracut/modules.d/20remount-secure/module-setup.sh
Executable file
@ -0,0 +1,30 @@
|
||||
#!/bin/bash
|
||||
|
||||
## Copyright (C) 2023 - 2023 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
|
||||
## See the file COPYING for copying conditions.
|
||||
|
||||
# called by dracut
|
||||
check() {
|
||||
require_binaries str_replace || return 1
|
||||
require_binaries mount || return 1
|
||||
require_binaries remount-secure || return 1
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
depends() {
|
||||
return 0
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
install() {
|
||||
inst_multiple str_replace
|
||||
inst_multiple mount
|
||||
inst_multiple remount-secure
|
||||
inst_hook cleanup 90 "$moddir/remount-secure.sh"
|
||||
}
|
||||
|
||||
# called by dracut
|
||||
installkernel() {
|
||||
return 0
|
||||
}
|
17
usr/lib/dracut/modules.d/20remount-secure/remount-secure.sh
Executable file
17
usr/lib/dracut/modules.d/20remount-secure/remount-secure.sh
Executable file
@ -0,0 +1,17 @@
|
||||
#!/bin/sh
|
||||
|
||||
## Copyright (C) 2023 - 2023 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
|
||||
## See the file COPYING for copying conditions.
|
||||
|
||||
remount_hook() {
|
||||
local remount_action
|
||||
remount_action=$(getarg remountsecure)
|
||||
|
||||
if [ ! "$remount_action" = "yes" ]; then
|
||||
return 0
|
||||
fi
|
||||
|
||||
remount-secure
|
||||
}
|
||||
|
||||
remount_hook
|
Loading…
Reference in New Issue
Block a user