Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
I
initramfs-with-mca
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
initramfs-with-mca
Commits
4fb98f98
Commit
4fb98f98
authored
Nov 22, 2022
by
Ophélie Gagnard
1
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
dracut.module: Support SCAN_FILE macro.
parent
d7b5c639
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
6 deletions
+7
-6
dracut.module/90metadata-collect/collect.sh
dracut.module/90metadata-collect/collect.sh
+7
-6
No files found.
dracut.module/90metadata-collect/collect.sh
View file @
4fb98f98
...
...
@@ -5,17 +5,18 @@
source
$NEWROOT
/etc/rapid.space/get-network.sh
WENDELIN_REFERENCE
=
$(
cat
$NEWROOT
/etc/rapid.space/wendelin_reference
)
WENDELIN_USER
=
$(
cat
$NEWROOT
/etc/rapid.space/wendelin_user
)
sed
-i
"s/%WENDELIN_REFERENCE%/
$WENDELIN_REFERENCE
/g;s/%WENDELIN_USER%/
$WENDELIN_USER
/g"
/etc/flb.conf
SCAN_FILE
=
/var/log/metadata_collect.log
sed
-i
"s/%SCAN_FILE%/
$SCAN_FILE
/g;s/%WENDELIN_REFERENCE%/
$WENDELIN_REFERENCE
/g;s/%WENDELIN_USER%/
$WENDELIN_USER
/g"
/etc/flb.conf
log_file
=
/var/log/metadata_collect.log
SCAN_FILE
=
/var/log/metadata_collect.log
timestamp_cmd
=
'date +"%Y/%m/%d %H:%M %Z"'
/sbin/fluent-bit
-e
/etc/libfluentbit_wendelin.so
-c
/etc/flb.conf &
flb_pid
=
$!
sleep
1
# let fluent-bit be ready to listen to the log file
echo
"{
\"
beginning_date
\"
:
\"
$(
eval
"
$timestamp_cmd
"
)
\"
}"
>>
$
log_file
/sbin/metadata-collect-agent
$NEWROOT
/usr/bin
$
log_file
/sbin/metadata-collect-agent
$NEWROOT
/usr/sbin
$
log_file
echo
"{
\"
end_date
\"
:
\"
$(
eval
"
$timestamp_cmd
"
)
\"
,
\"
end_marker
\"
:
\"
fluentbit_end
\"
}"
>>
$
log_file
echo
"{
\"
beginning_date
\"
:
\"
$(
eval
"
$timestamp_cmd
"
)
\"
}"
>>
$
SCAN_FILE
/sbin/metadata-collect-agent
$NEWROOT
/usr/bin
$
SCAN_FILE
/sbin/metadata-collect-agent
$NEWROOT
/usr/sbin
$
SCAN_FILE
echo
"{
\"
end_date
\"
:
\"
$(
eval
"
$timestamp_cmd
"
)
\"
,
\"
end_marker
\"
:
\"
fluentbit_end
\"
}"
>>
$
SCAN_FILE
wait
$flb_pid
Ophélie Gagnard
@Ophelie
mentioned in commit
684b9442
·
Nov 22, 2022
mentioned in commit
684b9442
mentioned in commit 684b94426739538a368bd8072b1e1e84bae2e7e3
Toggle commit list
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment