Skip to content

Commit

Permalink
move cobbler setup to mgr-setup
Browse files Browse the repository at this point in the history
  • Loading branch information
mbussolotto committed Aug 23, 2023
1 parent d61b712 commit a8530b7
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 9 deletions.
13 changes: 13 additions & 0 deletions susemanager/bin/mgr-setup
Original file line number Diff line number Diff line change
Expand Up @@ -411,6 +411,17 @@ fi
setup_apache() {
sysconf_addword /etc/sysconfig/apache2 APACHE_MODULES wsgi
}

setup_cobbler() {
if [ -f "/etc/cobbler/settings" ]; then
if ! grep "tftpsync_timeout:" /etc/cobbler/settings >/dev/null; then
echo "" >> /etc/cobbler/settings
echo "tftpsync_timeout: 15" >> /etc/cobbler/settings
echo "" >> /etc/cobbler/settings
fi
fi
}

setup_spacewalk() {
CERT_COUNTRY=`echo -n $CERT_COUNTRY|tr '[:lower:]' '[:upper:]'`

Expand Down Expand Up @@ -912,6 +923,8 @@ do_setup() {
setup_spacewalk

setup_apache

setup_cobbler

# In the container case, we have the MIRROR_PATH environment variable at setup
if [ -n "$MIRROR_PATH" ]; then
Expand Down
9 changes: 0 additions & 9 deletions tftpsync/susemanager-tftpsync/susemanager-tftpsync.spec
Original file line number Diff line number Diff line change
Expand Up @@ -78,15 +78,6 @@ install -p -D -m 755 configure-tftpsync.sh %{buildroot}%{_sbindir}/configure-tf
%endif
%endif

%post
if [ -f "/etc/cobbler/settings" ]; then
if ! grep "tftpsync_timeout:" /etc/cobbler/settings >/dev/null; then
echo "" >> /etc/cobbler/settings
echo "tftpsync_timeout: 15" >> /etc/cobbler/settings
echo "" >> /etc/cobbler/settings
fi
fi

%files
%defattr(-,root,root,-)
%doc COPYING.LIB README
Expand Down

0 comments on commit a8530b7

Please sign in to comment.