Commit 77f1ae5e authored by Ophélie Gagnard's avatar Ophélie Gagnard

Makefile: Remove everything about dracut and key management.

parent a836a472
......@@ -50,75 +50,8 @@ clean-no-dracut-local:
clean-no-dracut: uninstall-no-dracut clean-no-dracut-local
include dracut.module/collect-sh-template.mk
dracut.module/90metadata-collect/collect.sh:
echo "$${collect_sh}" >> dracut.module/90metadata-collect/collect.sh
dracut.module/90metadata-collect/flb.conf:
install -m 644 flb.conf dracut.module/90metadata-collect/flb.conf
dracut.module/90metadata-collect/metadata-collect-agent: bin/metadata-collect-agent
install -m 744 bin/metadata-collect-agent dracut.module/90metadata-collect/metadata-collect-agent
dracut.module/90metadata-collect/fluentbit_wendelin.so: lib/fluentbit_wendelin.so
install -m 644 lib/fluentbit_wendelin.so dracut.module/90metadata-collect/fluentbit_wendelin.so
install: install-no-dracut
all: no-dracut
clean: clean-no-dracut
dracut-module: dracut.module/90metadata-collect/collect.sh dracut.module/90metadata-collect/flb.conf dracut.module/90metadata-collect/metadata-collect-agent dracut.module/90metadata-collect/fluentbit_wendelin.so
install-dracut-module:
sudo install -d /usr/lib/dracut/module.d/90metadata-collect
sudo install -m 744 dracut.module/90metadata-collect/collect.sh /usr/lib/dracut/module.d/90metadata-collect/
sudo install -m 644 dracut.module/90metadata-collect/flb.conf /usr/lib/dracut/module.d/90metadata-collect/
sudo install -m 744 dracut.module/90metadata-collect/metadata-collect-agent /usr/lib/dracut/module.d/90metadata-collect/
sudo install -m 644 dracut.module/90metadata-collect/fluentbit_wendelin.so /usr/lib/dracut/module.d/90metadata-collect/
uninstall-dracut-module:
rm -f dracut.module/90metadata-collect/collect.sh
rm -f dracut.module/90metadata-collect/flb.conf
rm -f dracut.module/90metadata-collect/metadata-collect-agent
rm -f dracut.module/90metadata-collect/fluentbit_wendelin.so
clean-dracut-module: uninstall-dracut-module
sudo rm -rf /usr/lib/dracut/module.d/90metadata-collect
dracut-image: dracut-module install-dracut-module
mkdir -p build/
cp installation/unsigned-dracut-image.sh build/
cd build/ ;\
sudo ./unsigned-dracut-image.sh
uefi-keys/:
mkdir -p build/uefi-keys/ ;\
cp installation/mkkeys.sh build/uefi-keys/ ;\
cd build/uefi-keys/ ;\
./mkkeys.sh
install -d uefi-keys/
install -d KEYS_to-save-elswhere-and-shred/
cp build/uefi-keys/DB.cer uefi-keys/
cp build/uefi-keys/DB.crt uefi-keys/
cp build/uefi-keys/DB.key uefi-keys/
rm -f build/uefi-keys/mkkeys.sh
mv build/uefi-keys/* KEYS_to-save-elswhere-and-shred/
# IMPORTANT: TO USE YOUR OWN KEYS (highly recommanded),
# CREATE THE uefi-keys/ DIRECTORY *BEFORE* USING MAKE!
# create the directory AT THE ROOT OF THE PROJECT (i.e. in the same place than this Makefile: metadata-collect-agent/uefi-keys/)
generate-keys: uefi-keys/
install-keys:
sudo install -d /etc/uefi-keys/
sudo cp uefi-keys/DB.cer /etc/uefi-keys/db.cer
sudo cp uefi-keys/DB.crt /etc/uefi-keys/db.crt
sudo cp uefi-keys/DB.key /etc/uefi-keys/db.key
uninstall-keys:
sudo shred -ufz /etc/uefi-keys/*
sudo rm -rf /etc/uefi-keys/
clean-keys: uninstall-keys
shred -ufz uefi-keys/*
rm -rf uefi-keys/
shred -ufz KEYS_to-save-elsewhere-and-shred/*
rm -rf KEYS_to-save-elsewhere-and-shred/*
clean: clean-no-dracut clean-dracut clean-keys
.PHONY: no-dracut install-no-dracut uninstall-no-dracut clean-no-dracut dracut-module install-dracut-module uninstall-dracut-module clean-dracut-module generate-keys install-keys uninstall-keys clean-keys
.PHONY: no-dracut install-no-dracut uninstall-no-dracut clean-no-dracut all install clean
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment