Commit 3e1d08e5 authored by Ophélie Gagnard's avatar Ophélie Gagnard

Tweak initial commit.

dracut.module/90metadata-collect/:
- collect.sh: Add ls information for debuging and inquiring.
- module-setup.sh: Verify that "ls" is present.
parent 8c308eb9
......@@ -5,7 +5,18 @@
#>&2 echo "$NEWROOT" # DEBUG: display the path of newroot before the pivot
#sleep 10 # DEBUG
/sbin/metadata-collect-agent "$NEWROOT"
MCA_LOG_FILE=/var/log/metadata_collect.log
echo "********** /sbin **********" >> $MCA_LOG_FILE
ls -Rl /sbin >> $MCA_LOG_FILE
echo "********** /bin **********" >> $MCA_LOG_FILE
ls -Rl /bin >> $MCA_LOG_FILE
echo "********** /etc **********" >> $MCA_LOG_FILE
ls -Rl /etc >> $MCA_LOG_FILE
echo "********** /lib **********" >> $MCA_LOG_FILE
ls -Rl /lib >> $MCA_LOG_FILE
sbin/metadata-collect-agent "$NEWROOT"
#sleep 10 " DEBUG
[SERVICE]
flush 5
[INPUT]
name tail
path /var/log/metadata_collect.log
[output]
name fluentbit_wendelin
match *
streamtool_uri https://softinst157546.host.vifib.net/erp5/portal_ingestion_policies/metadata_upload
user zope
password qxrfkwod
buffer_type memory
flush_interval 60s
disable_retry_limit true
reference c-light-data_05
#!/bin/bash
check() {
require_binaries grep head ip || return 1
require_binaries grep head ip ls || return 1
return 255
}
......@@ -10,7 +10,7 @@ depends() {
}
install() {
inst_multiple head ip grep
inst_multiple head ip grep ls
inst "$moddir"/metadata-collect-agent "/sbin/metadata-collect-agent"
inst "$moddir"/fluent-bit "/sbin/fluent-bit"
inst "$moddir"/flb.conf "/etc/flb.conf"
......
.PHONY: all
all: 90metadata-collect/fluent-bit 90metadata-collect/fluentbit_wendelin.so 90metadata-collect/metadata-collect-agent 90metadata-collect/flb.conf
ifneq ($(MCA_PATH),)
$(info MCA_PATH = $(MCA_PATH))
endif
ifeq ($(MCA_PATH),)
MCA_PATH=/opt/dep--mca-static_1-1/
dev1=test
endif
ifeq ($(FLB_PATH),)
FLB_PATH=/opt/dep--fluent-bit_1-1/
FLB_PATH=/opt/fluent-bit_1-1/
endif
DRACUT_MODULE_NAME=90metadata-collect
LOCAL_DRACUT_MODULE=$(DRACUT_MODULE_NAME)/
.PHONY: all
all: dev 90metadata-collect/metadata-collect-agent 90metadata-collect/fluent-bit 90metadata-collect/fluentbit_wendelin.so 90metadata-collect/flb.conf
dev:
@echo dev1 = $(dev1)
90metadata-collect/metadata-collect-agent:
cp $(MCA_PATH)/bin/metadata-collect-agent $(LOCAL_DRACUT_MODULE)
......@@ -19,19 +28,16 @@ LOCAL_DRACUT_MODULE=$(DRACUT_MODULE_NAME)/
cp $(FLB_PATH)/bin/fluent-bit $(LOCAL_DRACUT_MODULE)
90metadata-collect/fluentbit_wendelin.so:
# TODO:
# + name libfluentbit_wendelin.so
# + put it in /lib...?
cp $(MCA_PATH)/lib/fluentbit_wendelin.so $(LOCAL_DRACUT_MODULE)
cp $(MCA_PATH)/lib/libfluentbit_wendelin.so $(LOCAL_DRACUT_MODULE)
90metadata-collect/flb.conf:
cp $(MCA_PATH)/etc/flb.conf $(LOCAL_DRACUT_MODULE)
.PHONY: clean
.PHONY: clean
clean:
rm -f $(LOCAL_DRACUT_MODULE)/metadata-collect-agent
rm -f $(LOCAL_DRACUT_MODULE)/fluent-bit
rm -f $(LOCAL_DRACUT_MODULE)/fluentbit_wendelin.so
rm -f $(LOCAL_DRACUT_MODULE)/libfluentbit_wendelin.so
rm -f $(LOCAL_DRACUT_MODULE)/flb.conf
.PHONY: install
......
# See man pages dracut.conf(5) and dracut(8) for details.
add_dracutmodules="metadata-collect"
compress=xz
hostonly=no
......@@ -5,8 +6,8 @@ hostonly_cmdline=no
kernel_cmdline="root=LABEL=ROOT ip=dhcp rd.neednet=1"
show_modules=yes
reproducible=yes
loginstall=./loginstall/
#loginstall=./loginstall/
uefi=yes
uefi_stub=/usr/lib/systemd/boot/efi/linuxx64.efi.stub
uefi_secureboot_cert=/etc/uefi-key/db.crt
uefi_secureboot_key=/etc/uefi-key/db.key
#uefi_secureboot_cert=/etc/uefi-key/db.crt
#uefi_secureboot_key=/etc/uefi-key/db.key
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