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
899baa9d
Commit
899baa9d
authored
Dec 12, 2022
by
Ophélie Gagnard
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
get value from .cfg
parent
80f83ae2
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
7 deletions
+8
-7
dracut.module/90metadata-collect/collect.sh
dracut.module/90metadata-collect/collect.sh
+7
-2
generation/10install-dependencies.sh
generation/10install-dependencies.sh
+1
-2
generation/20generate-image.sh
generation/20generate-image.sh
+0
-3
No files found.
dracut.module/90metadata-collect/collect.sh
View file @
899baa9d
...
...
@@ -4,9 +4,14 @@
source
$NEWROOT
/etc/rapid.space/get-network.sh
SLAPOS_CFG_FILE
=
"
$NEWROOT
"
/etc/opt/slapos/slapos.cfg
WENDELIN_REFERENCE
=
$(
sed
-n
'/computer_id = /p'
/etc/opt/slapos/slapos.cfg |
sed
's/computer_id = \(.*\)/\1/g'
)
WENDELIN_REFERENCE
=
$(
sed
-n
'/computer_id = /p'
"
$SLAPOS_CFG_FILE
"
|
sed
's/computer_id = \(.*\)/\1/g'
)
WENDELIN_URL
=
$(
sed
-n
'/master_url = /p'
"
$SLAPOS_CFG_FILE
"
|
sed
's/master_url = \(.*\)/\1/g'
)
SLAPOS_KEY_FILE
=
"
$NEWROOT
"
$(
sed
-n
'/key_file = /p'
"
$SLAPOS_CFG_FILE
"
|
sed
's/key_file = \(.*\)/\1/g'
)
SLAPOS_CERT_FILE
=
"
$NEWROOT
"
$(
sed
-n
'/cert_file = /p'
"
$SLAPOS_CFG_FILE
"
|
sed
's/cert_file = \(.*\)/\1/g'
)
SCAN_FILE
=
/var/log/metadata_collect.log
sed
-i
"s|%SCAN_FILE%|
$SCAN_FILE
|g;s/%WENDELIN_REFERENCE%/
$WENDELIN_REFERENCE
/g;s/%NEWROOT%/
$NEWROOT
/g"
/etc/flb.conf
sed
-i
"s|%SCAN_FILE%|
$SCAN_FILE
|g;s|%WENDELIN_REFERENCE%|
$WENDELIN_REFERENCE
|g;s|%SLAPOS_KEY_FILE%|
$SLAPOS_KEY_FILE
|g;s|%SLAPOS_CERT_FILE%|
$SLAPOS_CERT_FILE
|g;s|%WENDELIN_URL%|
$WENDELIN_URL
|g"
/etc/flb.conf
timestamp_cmd
=
'date +"%Y/%m/%d %H:%M %Z"'
/sbin/fluent-bit
-e
/etc/libfluentbit_wendelin.so
-c
/etc/flb.conf &
...
...
generation/10install-dependencies.sh
View file @
899baa9d
...
...
@@ -40,8 +40,7 @@ apt -y install ./"$FLB_PACKAGE_FILE"
apt
-y
install
./
"
$PLG_PACKAGE_FILE
"
FLB_CONF_PATH
=
"/opt/
${
PLG_PACKAGE_NAME
}
/etc"
CONF_REGEX
=
"s|%WENDELIN_URL%|
${
WENDELIN_URL
}
|g;s|%WENDELIN_PWD%|
${
WENDELIN_PWD
}
|g"
sed
"
$CONF_REGEX
"
"
${
FLB_CONF_PATH
}
/flb.conf.in"
>
"
${
FLB_CONF_PATH
}
/flb.conf"
cp
"
${
FLB_CONF_PATH
}
/flb.conf.in"
"
${
FLB_CONF_PATH
}
/flb.conf"
echo
"Created
${
FLB_CONF_PATH
}
/flb.conf from template
${
FLB_CONF_PATH
}
/flb.conf.in"
echo
-e
"
\n
Dependencies successfully installed!
\n
"
generation/20generate-image.sh
View file @
899baa9d
...
...
@@ -6,9 +6,6 @@
required_variables
=
"
CERT_NAME
SERVER_GROUP
WENDELIN_URL
WENDELIN_USER
WENDELIN_PWD
"
for
variable
in
$required_variables
;
do
if
[
!
-v
"
$variable
"
]
;
then
...
...
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