mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 09:12:45 +01:00
install createrepo on airgap and non airgap
This commit is contained in:
@@ -45,6 +45,12 @@ yara_log_dir:
|
|||||||
- user
|
- user
|
||||||
- group
|
- group
|
||||||
|
|
||||||
|
{% if GLOBALS.os_family == 'RedHat' %}
|
||||||
|
install_createrepo:
|
||||||
|
pkg.installed:
|
||||||
|
- name: createrepo
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
repo_conf_dir:
|
repo_conf_dir:
|
||||||
file.directory:
|
file.directory:
|
||||||
- name: /opt/so/conf/reposync
|
- name: /opt/so/conf/reposync
|
||||||
|
|||||||
@@ -803,7 +803,6 @@ create_manager_pillars() {
|
|||||||
|
|
||||||
create_repo() {
|
create_repo() {
|
||||||
title "Create the repo directory"
|
title "Create the repo directory"
|
||||||
logCmd "dnf -y install yum-utils createrepo"
|
|
||||||
logCmd "createrepo /nsm/repo"
|
logCmd "createrepo /nsm/repo"
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1821,13 +1820,14 @@ repo_sync_local() {
|
|||||||
echo "gpgcheck=1" >> /opt/so/conf/reposync/repodownload.conf
|
echo "gpgcheck=1" >> /opt/so/conf/reposync/repodownload.conf
|
||||||
|
|
||||||
logCmd "dnf repolist"
|
logCmd "dnf repolist"
|
||||||
|
logCmd "dnf -y install yum-utils createrepo"
|
||||||
|
|
||||||
if [[ ! $is_airgap ]]; then
|
if [[ ! $is_airgap ]]; then
|
||||||
curl --retry 5 --retry-delay 60 -A "netinstall/$SOVERSION/$OS/$(uname -r)/1" https://sigs.securityonion.net/checkup --output /tmp/install
|
curl --retry 5 --retry-delay 60 -A "netinstall/$SOVERSION/$OS/$(uname -r)/1" https://sigs.securityonion.net/checkup --output /tmp/install
|
||||||
retry 5 60 "dnf reposync --norepopath -g --delete -m -c /opt/so/conf/reposync/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/" >> "$setup_log" 2>&1 || fail_setup
|
retry 5 60 "dnf reposync --norepopath -g --delete -m -c /opt/so/conf/reposync/repodownload.conf --repoid=securityonionsync --download-metadata -p /nsm/repo/" >> "$setup_log" 2>&1 || fail_setup
|
||||||
|
# After the download is complete run createrepo
|
||||||
|
create_repo
|
||||||
fi
|
fi
|
||||||
# After the download is complete run createrepo
|
|
||||||
create_repo
|
|
||||||
else
|
else
|
||||||
# Add the proper repos for unsupported stuff
|
# Add the proper repos for unsupported stuff
|
||||||
echo "Adding Repos"
|
echo "Adding Repos"
|
||||||
|
|||||||
Reference in New Issue
Block a user