mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
tests: Force hostname as 'autopkgtest' if the system didn't have one.
This commit is contained in:
2
debian/changelog
vendored
2
debian/changelog
vendored
@@ -2,6 +2,8 @@ freeipa (4.6.3-1) UNRELEASED; urgency=medium
|
|||||||
|
|
||||||
* New upstream release.
|
* New upstream release.
|
||||||
* support-kdb-dal-7.0.diff: Dropped, upstream.
|
* support-kdb-dal-7.0.diff: Dropped, upstream.
|
||||||
|
* tests: Force hostname as 'autopkgtest' if the system didn't have
|
||||||
|
one.
|
||||||
|
|
||||||
-- Timo Aaltonen <tjaalton@debian.org> Thu, 01 Feb 2018 14:14:10 +0200
|
-- Timo Aaltonen <tjaalton@debian.org> Thu, 01 Feb 2018 14:14:10 +0200
|
||||||
|
|
||||||
|
|||||||
18
debian/tests/server-install
vendored
18
debian/tests/server-install
vendored
@@ -2,14 +2,20 @@
|
|||||||
|
|
||||||
# hack for lxc
|
# hack for lxc
|
||||||
IP=`ip route get 1.1.1.1 | sed -n -e's/.*src //; s/ .*//; p; q'`
|
IP=`ip route get 1.1.1.1 | sed -n -e's/.*src //; s/ .*//; p; q'`
|
||||||
HOSTNAME=`cat /etc/hosts| grep '127.0.1.1' | awk '{print $NF; exit}'`
|
echo "IP address is $IP"
|
||||||
|
|
||||||
|
HOSTNAME=`cat /etc/hosts| grep '127.0.1.1' | awk '{print $NF; exit}' | sed 's/\..*//'`
|
||||||
|
echo "Hostname was: $HOSTNAME"
|
||||||
|
|
||||||
|
if [ -z $HOSTNAME ]; then
|
||||||
|
HOSTNAME=autopkgtest
|
||||||
|
hostname $HOSTNAME
|
||||||
|
echo $HOSTNAME > /etc/hostname
|
||||||
|
fi
|
||||||
|
|
||||||
echo "$IP $HOSTNAME.debci $HOSTNAME" >> /etc/hosts
|
echo "$IP $HOSTNAME.debci $HOSTNAME" >> /etc/hosts
|
||||||
|
|
||||||
echo "IP address is $IP"
|
echo "/etc/hosts now has:"
|
||||||
echo "Hostname is: $HOSTNAME"
|
|
||||||
echo "/etc/hostname has:"
|
|
||||||
cat /etc/hostname
|
|
||||||
echo "/etc/hosts has:"
|
|
||||||
cat /etc/hosts
|
cat /etc/hosts
|
||||||
|
|
||||||
if [ ! -d /etc/systemd/system/pki-tomcatd.target.wants ]; then
|
if [ ! -d /etc/systemd/system/pki-tomcatd.target.wants ]; then
|
||||||
|
|||||||
Reference in New Issue
Block a user