mirror of
https://github.com/Kicksecure/security-misc.git
synced 2025-07-15 18:29:44 +07:00
remount-secure: disable debugging to save space in initrd
This commit is contained in:
@ -23,9 +23,12 @@ init() {
|
|||||||
|
|
||||||
$output_command "$0: INFO: START"
|
$output_command "$0: INFO: START"
|
||||||
|
|
||||||
if [ "$(id -u)" != "0" ]; then
|
## dracut does not have id. Saving space in initial ramdisk.
|
||||||
$output_command "ERROR: must be run as root! sudo $0"
|
if command -v id &>/dev/null ; then
|
||||||
exit 1
|
if [ "$(id -u)" != "0" ]; then
|
||||||
|
$output_command "ERROR: must be run as root! sudo $0"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mkdir --parents "/run/remount-secure"
|
mkdir --parents "/run/remount-secure"
|
||||||
|
@ -5,11 +5,14 @@
|
|||||||
|
|
||||||
# called by dracut
|
# called by dracut
|
||||||
check() {
|
check() {
|
||||||
|
## For debugging only.
|
||||||
|
## Saving space in initial ramdisk.
|
||||||
|
#require_binaries id || return 1
|
||||||
|
#require_binaries env || return 1
|
||||||
|
|
||||||
require_binaries findmnt || return 1
|
require_binaries findmnt || return 1
|
||||||
require_binaries touch || return 1
|
require_binaries touch || return 1
|
||||||
require_binaries grep || return 1
|
require_binaries grep || return 1
|
||||||
require_binaries id || return 1
|
|
||||||
require_binaries env || return 1
|
|
||||||
require_binaries mount || return 1
|
require_binaries mount || return 1
|
||||||
require_binaries remount-secure || return 1
|
require_binaries remount-secure || return 1
|
||||||
return 0
|
return 0
|
||||||
@ -22,11 +25,14 @@ depends() {
|
|||||||
|
|
||||||
# called by dracut
|
# called by dracut
|
||||||
install() {
|
install() {
|
||||||
|
## For debugging only.
|
||||||
|
## Saving space in initial ramdisk.
|
||||||
|
#inst_multiple id
|
||||||
|
#inst_multiple env
|
||||||
|
|
||||||
inst_multiple findmnt
|
inst_multiple findmnt
|
||||||
inst_multiple touch
|
inst_multiple touch
|
||||||
inst_multiple grep
|
inst_multiple grep
|
||||||
inst_multiple id
|
|
||||||
inst_multiple env
|
|
||||||
inst_multiple mount
|
inst_multiple mount
|
||||||
inst_multiple remount-secure
|
inst_multiple remount-secure
|
||||||
inst_hook cleanup 90 "$moddir/remount-secure.sh"
|
inst_hook cleanup 90 "$moddir/remount-secure.sh"
|
||||||
|
Reference in New Issue
Block a user