Commit 22eaf730 authored by Ophélie Gagnard's avatar Ophélie Gagnard

dracut.module: Simplify the dracut module

parent 423811cb
#!/bin/bash
. /lib/dracut-lib.sh
#/sbin/metadata-collect-agent $NEWROOT /sbin/fluent-bit /etc/libfluentbit_wendelin.so /etc/flb.conf /var/log/metadata_collect.log
#!/bin/bash
. /lib/dracut-lib.sh
DEBUG_LOG_FILE=/var/log/debug-mode.log
/sbin/fluent-bit -e /etc/libfluentbit_wendelin.so -c /etc/debug-mode.conf &
debug_flb_pid=$!
sleep 1 # wait for fluent-bit to monitor the log file (?)
echo "NEWROOT = $NEWROOT" &>> $DEBUG_LOG_FILE
echo "********** /usr/sbin **********" &>> $DEBUG_LOG_FILE
ls -Rl /usr/sbin &>> $DEBUG_LOG_FILE
echo "********** /bin **********" &>> $DEBUG_LOG_FILE
ls -Rl /usr/bin &>> $DEBUG_LOG_FILE
echo "********** /usr/etc **********" &>> $DEBUG_LOG_FILE
ls -Rl /etc &>> $DEBUG_LOG_FILE
echo "********** /usr/lib **********" &>> $DEBUG_LOG_FILE
ls -Rl /usr/lib &>> $DEBUG_LOG_FILE
echo "fluentbit_end" &>> $DEBUG_LOG_FILE
wait $debug_flb_pid
/sbin/metadata-collect-agent $NEWROOT /sbin/fluent-bit /etc/libfluentbit_wendelin.so /etc/flb.conf /var/log/metadata_collect.log
#!/bin/bash
. /lib/dracut-lib.sh
/sbin/metadata-collect-agent $NEWROOT /sbin/fluent-bit /etc/libfluentbit_wendelin.so /etc/flb.conf /var/log/metadata_collect.log
......@@ -10,17 +10,9 @@ LOCAL_DRACUT_MODULE=$(DRACUT_MODULE_NAME)
.PHONY: all
#all: dev 90metadata-collect/collect.sh 90metadata-collect/metadata-collect-agent 90metadata-collect/fluent-bit 90metadata-collect/fluentbit_wendelin.so 90metadata-collect/flb.conf
all: 90metadata-collect/collect.sh 90metadata-collect/metadata-collect-agent 90metadata-collect/fluent-bit 90metadata-collect/fluentbit_wendelin.so 90metadata-collect/flb.conf
all: 90metadata-collect/metadata-collect-agent 90metadata-collect/fluent-bit 90metadata-collect/fluentbit_wendelin.so 90metadata-collect/flb.conf
#dev:
# @echo dev1 = $(dev1)
90metadata-collect/collect.sh:
# different options are vailable: debug-and-scan, only-debug, only-scan
cp $(LOCAL_DRACUT_MODULE)/only-scan.sh $(LOCAL_DRACUT_MODULE)/collect.sh
90metadata-collect/metadata-collect-agent:
cp $(MCA_PATH)/bin/metadata-collect-agent $(LOCAL_DRACUT_MODULE)
......@@ -35,7 +27,6 @@ all: 90metadata-collect/collect.sh 90metadata-collect/metadata-collect-agent 90m
.PHONY: clean
clean:
rm -f $(LOCAL_DRACUT_MODULE)/collect.sh
rm -f $(LOCAL_DRACUT_MODULE)/metadata-collect-agent
rm -f $(LOCAL_DRACUT_MODULE)/fluent-bit
rm -f $(LOCAL_DRACUT_MODULE)/libfluentbit_wendelin.so
......
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