set -e
. "@commondir@/common.sh"
+# Check if the task should be prevented from running.
+check_if_excluded
+
windows_hostname() {
local target="$1"
local password="$2"
redhat)
sed -ie "s/HOSTNAME=.*$/HOSTNAME=$hostname/g" "$target/etc/sysconfig/network";;
slackware|suse)
- #local domain=$(sed -e 's/^[^\.]*//g' < /etc/HOSTNAME)
-
- # In slackware hostname and domain name are joined together. For now I
- # will not retain the domain name.
-
- echo "$hostname" > "${target}/etc/HOSTNAME";;
- gentoo)
- sed -ie "s/\(\(HOSTNAME\)\|\(hostname\)\)=.*$/\1=\"$hostname\"/" "$target/etc/conf.d/hostname";;
+ #local domain=$(sed -e 's/^[^\.]*//g' < /etc/HOSTNAME)
+
+ # In slackware hostname and domain name are joined together. For now
+ # I will not retain the domain name.
+ echo "$hostname" > "${target}/etc/HOSTNAME";;
+ gentoo)
+ sed -ie "s/\(\(HOSTNAME\)\|\(hostname\)\)=.*$/\1=\"$hostname\"/" "$target/etc/conf.d/hostname";;
esac
# Some Linux distributions assign the hostname to 127.0.1.1 in order to be