Skip to content

Commit

Permalink
Remove unused hostname calls
Browse files Browse the repository at this point in the history
Containerized server does not ship hostname binary and uyuni tools
always provide correct hostname as a configuration option.
  • Loading branch information
aaannz authored and cbosdo committed Nov 12, 2024
1 parent 32e6e72 commit b4ca421
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
5 changes: 0 additions & 5 deletions spacewalk/setup/bin/spacewalk-setup
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,6 @@ push @skip, Spacewalk::Setup::EMBEDDED_DB_ANSWERS
Spacewalk::Setup::load_answer_file(\%opts, \%answers, \@skip);
my $product_name = $answers{'product_name'} || 'Spacewalk';

my $hn = `/bin/hostname -f`;
chomp($hn);
$hn = Sys::Hostname::hostname if(!defined $hn || $hn eq "");
$answers{hostname} ||= "$hn";

if (not $opts{"skip-fqdn-test"} and
not (lc($answers{hostname}) eq $answers{hostname})) {
print Spacewalk::Setup::loc(
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- Remove now unneeded hostname calls (bsc#1231255)
3 changes: 1 addition & 2 deletions susemanager/bin/mgr-setup
Original file line number Diff line number Diff line change
Expand Up @@ -277,8 +277,7 @@ scc-pass = $SCC_PASS
/usr/bin/spacewalk-setup --non-interactive --clear-db $PARAM_CC --answer-file=/root/spacewalk-answers $PARAM_DB
SWRET=$?
if [ "x" = "x$MANAGER_MAIL_FROM" ]; then
MY_DOMAIN=`hostname -d`
MANAGER_MAIL_FROM="$PRODUCT_NAME ($REALHOSTNAME) <root@$MY_DOMAIN>"
MANAGER_MAIL_FROM="$PRODUCT_NAME ($HOSTNAME) <root@$HOSTNAME>"
fi
if ! grep "^web.default_mail_from" /etc/rhn/rhn.conf > /dev/null; then
echo "web.default_mail_from = $MANAGER_MAIL_FROM" >> /etc/rhn/rhn.conf
Expand Down
1 change: 1 addition & 0 deletions susemanager/susemanager.changes.cbosdo.setup-cleanup
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
- Cleanup the setup script (bsc#1231255)
- Remove now unneeded hostname calls (bsc#1231255)

0 comments on commit b4ca421

Please sign in to comment.