Commit ec7d0e09 authored by Ophélie Gagnard's avatar Ophélie Gagnard

old.installation: Moved from installation/

parent 4a41f079
......@@ -17,11 +17,11 @@ git config --global user.name "Ophelie Gagnard"
# building initramfs
apt -y install $APT_SPECIFIC_PACKAGES
rm -f "$MCA_PACKAGE_FILE"
rm -f "$FLUENTBIT_PACKAGE_FILE"
rm -f "$FLB_PACKAGE_FILE"
wget "$MCA_PACKAGE_URL"
wget "$FLUENTBIT_PACKAGE_URL"
wget "$FLB_PACKAGE_URL"
apt -y install ./"$MCA_PACKAGE_FILE"
apt -y install ./"$FLUENTBIT_PACKAGE_FILE"
apt -y install ./"$FLB_PACKAGE_FILE"
MCA_CONF_PATH="/opt/${MCA_PACKAGE_NAME}/etc"
CONF_REGEX="s|%WENDELIN_URL%|${WENDELIN_URL}|g;s|%WENDELIN_PWD%|${WENDELIN_PWD}|g;s|%WENDELIN_REFERENCE%|${WENDELIN_REFERENCE}|g"
......
......@@ -8,9 +8,9 @@ PROJECT_DIR=$GIT_ROOT
### TO BE MODIFIED BY USERS ###
## Packages
MCA_PACKAGE_NAME=mca--static
FLUENTBIT_PACKAGE_NAME=fluent-bit
FLB_PACKAGE_NAME=fluent-bit
MCA_VERSION=0.2h+0.1i+1.0.279+dep-1
FLUENTBIT_VERSION=1.9.7+1.0.279+dep-1
FLB_VERSION=1.9.7+1.0.279+dep-1
TARGET_DISTRIBUTION=Debian_11
ARCH=amd64
PACKAGE_EXTENSION=.deb
......@@ -27,17 +27,17 @@ SIGNING_KEY_NAME=db.key
# used mainly in dracut.module/configure
MCA_NAME_AND_VERSION=${MCA_PACKAGE_NAME}_${MCA_VERSION}
FLUENTBIT_NAME_AND_VERSION=${FLUENTBIT_PACKAGE_NAME}_${FLUENTBIT_VERSION}
FLB_NAME_AND_VERSION=${FLB_PACKAGE_NAME}_${FLB_VERSION}
# used mainly in installation/dependencies.sh and installation/remove-dependencies.sh
APT_UTILITY_PACKAGES="sudo wget tree"
APT_SPECIFIC_PACKAGES="dracut-core dracut dracut-network"
MCA_PACKAGE_FILE=${MCA_NAME_AND_VERSION}_${ARCH}${PACKAGE_EXTENSION}
FLUENTBIT_PACKAGE_FILE=${FLUENTBIT_NAME_AND_VERSION}_${ARCH}${PACKAGE_EXTENSION}
FLB_PACKAGE_FILE=${FLB_NAME_AND_VERSION}_${ARCH}${PACKAGE_EXTENSION}
URL_PATTERN="https://download.opensuse.org/repositories/home:VIFIBnexedi/${TARGET_DISTRIBUTION}/${ARCH}/"
MCA_PACKAGE_URL=${URL_PATTERN}/${MCA_PACKAGE_FILE}
FLUENTBIT_PACKAGE_URL=${URL_PATTERN}/${FLUENTBIT_PACKAGE_FILE}
FLB_PACKAGE_URL=${URL_PATTERN}/${FLB_PACKAGE_FILE}
# used mainly in installation/install.sh and installation/uninstall.sh
EFI_PARTITION_MOUNT_POINT=/boot/efi/
......
......@@ -108,6 +108,10 @@ EFI_PARTITION_MOUNT_POINT=$(get_partition_path "$efi_partition_type")
ROOT_PARTITION_ID=$(get_partition_id "$root_partition_type")
default_bootnum=100
echo DEBUG -------------------
echo ROOT_PARTITION_ID = "$ROOT_PARTITION_ID"
exit 1
# Get information about the network
DEFAULT_INTERFACE=$(get_default_interface)
DEFAULT_ROUTER=$(get_default_router)
......@@ -115,7 +119,7 @@ DEFAULT_IP=$(get_default_ip)
default_netmask=$(get_default_netmask)
default_netmask_number=$(echo -e "${default_netmask}" | awk -F / '{print $2}')
FORMATTED_NETMASK=$(int_to_generic_netmask "${default_netmask_number}")
HOSTNAME=$(hostname)
TARGET_HOSTNAME=$(hostname)
# Install the module
cd dracut.module
......@@ -125,7 +129,7 @@ make install
cd -
# Generation of dracut.module/dracut.conf
dracut_conf_regex="s|%PROJECT_DIR%|${PROJECT_DIR}|g;s|%PUBLIC_CERT_DIR%|${PUBLIC_CERT_DIR}|g;s|%PRIVATE_KEYS_DIR%|${PRIVATE_KEYS_DIR}|g;s|%CERT_NAME%|${CERT_NAME}|;s|%SIGNING_KEY_NAME%|${SIGNING_KEY_NAME}|g;s|%ROOT_PARTITION_ID%|${ROOT_PARTITION_ID}|g;s|%DEFAULT_INTERFACE%|${DEFAULT_INTERFACE}|g;s|%DEFAULT_ROUTER%|${DEFAULT_ROUTER}|g;s|%DEFAULT_IP%|${DEFAULT_IP}|g;s|%FORMATTED_NETMASK%|${FORMATTED_NETMASK}|g;s|%HOSTNAME%|${HOSTNAME}|g"
dracut_conf_regex="s|%PROJECT_DIR%|${PROJECT_DIR}|g;s|%PUBLIC_CERT_DIR%|${PUBLIC_CERT_DIR}|g;s|%PRIVATE_KEYS_DIR%|${PRIVATE_KEYS_DIR}|g;s|%CERT_NAME%|${CERT_NAME}|;s|%SIGNING_KEY_NAME%|${SIGNING_KEY_NAME}|g;s|%ROOT_PARTITION_ID%|${ROOT_PARTITION_ID}|g;s|%DEFAULT_INTERFACE%|${DEFAULT_INTERFACE}|g;s|%DEFAULT_ROUTER%|${DEFAULT_ROUTER}|g;s|%DEFAULT_IP%|${DEFAULT_IP}|g;s|%FORMATTED_NETMASK%|${FORMATTED_NETMASK}|g;s|%TARGET_HOSTNAME%|${TARGET_HOSTNAME}|g"
cd dracut.module
sed "${dracut_conf_regex}" dracut.conf.in > dracut.conf
cd -
......
......@@ -13,5 +13,5 @@ source env.sh
# building initramfs
apt-get -y remove ${MCA_PACKAGE_NAME} || true
apt-get -y remove ${FLUENTBIT_PACKAGE_NAME} || true
apt-get -y remove ${FLB_PACKAGE_NAME} || true
apt -y remove ${APT_SPECIFIC_PACKAGES} || true
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