2023-08-28 06:44:38 +02:00
|
|
|
#!/bin/bash
|
|
|
|
# Copyright (C) 2019 Intel Corporation
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
|
|
|
set -xe
|
|
|
|
SCRIPT_DIR="$(dirname "$(realpath "$0")")"
|
|
|
|
source "$SCRIPT_DIR"/globals.sh
|
|
|
|
source "$SCRIPT_DIR"/parameters.sh
|
|
|
|
|
2023-08-31 06:11:19 +02:00
|
|
|
dnf install -y nfs-utils
|
2023-08-28 06:44:38 +02:00
|
|
|
|
|
|
|
# Export server directory to be mounted by clients
|
|
|
|
echo "$KOJI_DIR $KOJI_SLAVE_FQDN(ro,no_root_squash)" >> /etc/exports
|
|
|
|
|
2023-08-29 08:08:48 +02:00
|
|
|
# allow nfs usage in selinux and firewall
|
|
|
|
setsebool -P httpd_use_nfs=1
|
|
|
|
|
|
|
|
firewall-cmd --permanent --add-service=nfs
|
|
|
|
firewall-cmd --permanent --add-service=mountd
|
|
|
|
firewall-cmd --permanent --add-service=rpc-bind
|
|
|
|
firewall-cmd --reload
|
|
|
|
|
2023-08-28 06:44:38 +02:00
|
|
|
systemctl enable --now rpcbind
|
|
|
|
systemctl enable --now nfs-server
|