Skip to content

Commit

Permalink
Merge pull request #1286 from ProBackup-nl/patch-1
Browse files Browse the repository at this point in the history
Use /etc/hostname also in the recovery system
if that file is used in the original system (e.g. in Arch Linux)
otherwise use /etc/HOSTNAME (e.g. used on RHEL and SLES)
to fix #1258
  • Loading branch information
jsmeix committed Apr 13, 2017
2 parents 8ace322 + 2019218 commit 363eba7
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion usr/share/rear/rescue/default/100_hostname.sh
Expand Up @@ -5,4 +5,11 @@
# This file is part of Relax-and-Recover, licensed under the GNU General
# Public License. Refer to the included COPYING for full text of license.

echo $HOSTNAME >$ROOTFS_DIR/etc/HOSTNAME
# For Arch Linux storing the host name in /etc/hostname (lowercase)
# will set the host name in the recovery environment without any scripting.

if [[ -e /etc/hostname ]] ; then
echo $HOSTNAME >$ROOTFS_DIR/etc/hostname
else
echo $HOSTNAME >$ROOTFS_DIR/etc/HOSTNAME
fi

0 comments on commit 363eba7

Please sign in to comment.