mirror of
https://github.com/Security-Onion-Solutions/securityonion.git
synced 2025-12-06 17:22:49 +01:00
ensure createrepo and yum-utils is installed from so repo
This commit is contained in:
12
.vscode/sftp.json
vendored
12
.vscode/sftp.json
vendored
@@ -1,12 +0,0 @@
|
|||||||
{
|
|
||||||
"name": "10.66.166.230",
|
|
||||||
"host": "10.66.166.230",
|
|
||||||
"protocol": "sftp",
|
|
||||||
"port": 22,
|
|
||||||
"username": "onionuser",
|
|
||||||
"remotePath": "/home/onionuser/so/",
|
|
||||||
"uploadOnSave": false,
|
|
||||||
"useTempFile": false,
|
|
||||||
"autoDelete": true,
|
|
||||||
"openSsh": false
|
|
||||||
}
|
|
||||||
@@ -1893,14 +1893,6 @@ securityonion_repo() {
|
|||||||
repo_sync_local() {
|
repo_sync_local() {
|
||||||
# Sync the repo from the the SO repo locally.
|
# Sync the repo from the the SO repo locally.
|
||||||
# Check for reposync
|
# Check for reposync
|
||||||
REPOSYNC=$(rpm -qa | grep createrepo | wc -l)
|
|
||||||
if [[ ! "$REPOSYNC" -gt 0 ]]; then
|
|
||||||
# Install reposync
|
|
||||||
info "Installing createrepo"
|
|
||||||
logCmd "yum -y install yum-utils createrepo"
|
|
||||||
else
|
|
||||||
info "We have what we need to sync"
|
|
||||||
fi
|
|
||||||
info "Backing up old repos"
|
info "Backing up old repos"
|
||||||
mkdir -p /nsm/repo
|
mkdir -p /nsm/repo
|
||||||
mkdir -p /root/reposync_cache
|
mkdir -p /root/reposync_cache
|
||||||
@@ -1924,6 +1916,15 @@ repo_sync_local() {
|
|||||||
echo "gpgcheck=1" >> /root/repodownload.conf
|
echo "gpgcheck=1" >> /root/repodownload.conf
|
||||||
echo "gpgkey=https://repo.securityonion.net/file/securityonion-repo/keys/securityonion.pub" >> /root/repodownload.conf
|
echo "gpgkey=https://repo.securityonion.net/file/securityonion-repo/keys/securityonion.pub" >> /root/repodownload.conf
|
||||||
|
|
||||||
|
REPOSYNC=$(rpm -qa | grep createrepo | wc -l)
|
||||||
|
if [[ ! "$REPOSYNC" -gt 0 ]]; then
|
||||||
|
# Install reposync
|
||||||
|
info "Installing createrepo"
|
||||||
|
logCmd "yum -y install -c /root/repodownload.conf yum-utils createrepo"
|
||||||
|
else
|
||||||
|
info "We have what we need to sync"
|
||||||
|
fi
|
||||||
|
|
||||||
logCmd "reposync --norepopath -n -g -l -d -m -c /root/repodownload.conf -r securityonionsync --download-metadata -p /nsm/repo/"
|
logCmd "reposync --norepopath -n -g -l -d -m -c /root/repodownload.conf -r securityonionsync --download-metadata -p /nsm/repo/"
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user