Skip to content

Commit b4ca421

Browse files
aaannzcbosdo
authored andcommitted
Remove unused hostname calls
Containerized server does not ship hostname binary and uyuni tools always provide correct hostname as a configuration option.
1 parent 32e6e72 commit b4ca421

File tree

4 files changed

+3
-7
lines changed

4 files changed

+3
-7
lines changed

spacewalk/setup/bin/spacewalk-setup

-5
Original file line numberDiff line numberDiff line change
@@ -56,11 +56,6 @@ push @skip, Spacewalk::Setup::EMBEDDED_DB_ANSWERS
5656
Spacewalk::Setup::load_answer_file(\%opts, \%answers, \@skip);
5757
my $product_name = $answers{'product_name'} || 'Spacewalk';
5858

59-
my $hn = `/bin/hostname -f`;
60-
chomp($hn);
61-
$hn = Sys::Hostname::hostname if(!defined $hn || $hn eq "");
62-
$answers{hostname} ||= "$hn";
63-
6459
if (not $opts{"skip-fqdn-test"} and
6560
not (lc($answers{hostname}) eq $answers{hostname})) {
6661
print Spacewalk::Setup::loc(
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
- Remove now unneeded hostname calls (bsc#1231255)

susemanager/bin/mgr-setup

+1-2
Original file line numberDiff line numberDiff line change
@@ -277,8 +277,7 @@ scc-pass = $SCC_PASS
277277
/usr/bin/spacewalk-setup --non-interactive --clear-db $PARAM_CC --answer-file=/root/spacewalk-answers $PARAM_DB
278278
SWRET=$?
279279
if [ "x" = "x$MANAGER_MAIL_FROM" ]; then
280-
MY_DOMAIN=`hostname -d`
281-
MANAGER_MAIL_FROM="$PRODUCT_NAME ($REALHOSTNAME) <root@$MY_DOMAIN>"
280+
MANAGER_MAIL_FROM="$PRODUCT_NAME ($HOSTNAME) <root@$HOSTNAME>"
282281
fi
283282
if ! grep "^web.default_mail_from" /etc/rhn/rhn.conf > /dev/null; then
284283
echo "web.default_mail_from = $MANAGER_MAIL_FROM" >> /etc/rhn/rhn.conf
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
- Cleanup the setup script (bsc#1231255)
2+
- Remove now unneeded hostname calls (bsc#1231255)

0 commit comments

Comments
 (0)