security-misc/usr/lib/dracut/modules.d/20remount-secure/module-setup.sh

39 lines
817 B
Bash
Raw Normal View History

2023-10-22 08:10:48 -04:00
#!/bin/bash
## Copyright (C) 2023 - 2023 ENCRYPTED SUPPORT LP <adrelanos@whonix.org>
## See the file COPYING for copying conditions.
# called by dracut
check() {
2023-10-22 10:22:21 -04:00
require_binaries findmnt || return 1
2023-10-22 10:15:11 -04:00
require_binaries touch || return 1
2023-10-22 10:10:51 -04:00
require_binaries grep || return 1
require_binaries id || return 1
2023-10-22 12:54:25 -04:00
require_binaries env || return 1
2023-10-22 08:10:48 -04:00
require_binaries mount || return 1
require_binaries remount-secure || return 1
return 0
}
# called by dracut
depends() {
return 0
}
# called by dracut
install() {
2023-10-22 10:22:21 -04:00
inst_multiple findmnt
2023-10-22 10:15:11 -04:00
inst_multiple touch
2023-10-22 10:10:51 -04:00
inst_multiple grep
inst_multiple id
2023-10-22 12:54:25 -04:00
inst_multiple env
2023-10-22 08:10:48 -04:00
inst_multiple mount
inst_multiple remount-secure
inst_hook cleanup 90 "$moddir/remount-secure.sh"
}
# called by dracut
installkernel() {
return 0
}