Revision c334f836
b/snf-image-helper/snf-image-helper.in | ||
---|---|---|
75 | 75 |
trap '{ umount "$target"; }' ERR |
76 | 76 |
|
77 | 77 |
if [ -z "$SNF_IMAGE_PROPERTY_EXCLUDE_ALL_TASKS" ]; then |
78 |
|
|
79 |
if [[ ! "$SNF_IMAGE_PROPERTY_OSFAMILY" =~ ^(linux|windows)$ ]]; then |
|
80 |
log_error "Supported values for OSFAMILY propertry are: linux|windows" |
|
81 |
fi |
|
82 |
|
|
78 | 83 |
# Redirect standard error to standard output, |
79 | 84 |
# prepend a timestamp before each line of output. |
80 | 85 |
echo "Execute all snf-image tasks...." |
b/snf-image-helper/tasks/50AssignHostname.in | ||
---|---|---|
56 | 56 |
redhat) |
57 | 57 |
sed -ie "s/HOSTNAME=.*$/HOSTNAME=$hostname/g" "$target/etc/sysconfig/network";; |
58 | 58 |
slackware|suse) |
59 |
#local domain=$(sed -e 's/^[^\.]*//g' < /etc/HOSTNAME) |
|
60 |
|
|
61 |
# In slackware hostname and domain name are joined together. For now I |
|
62 |
# will not retain the domain name. |
|
63 |
|
|
64 |
echo "$hostname" > "${target}/etc/HOSTNAME";; |
|
65 |
gentoo) |
|
66 |
sed -ie "s/\(\(HOSTNAME\)\|\(hostname\)\)=.*$/\1=\"$hostname\"/" "$target/etc/conf.d/hostname";; |
|
59 |
#local domain=$(sed -e 's/^[^\.]*//g' < /etc/HOSTNAME) |
|
60 |
|
|
61 |
# In slackware hostname and domain name are joined together. For now |
|
62 |
# I will not retain the domain name. |
|
63 |
echo "$hostname" > "${target}/etc/HOSTNAME";; |
|
64 |
gentoo) |
|
65 |
sed -ie "s/\(\(HOSTNAME\)\|\(hostname\)\)=.*$/\1=\"$hostname\"/" "$target/etc/conf.d/hostname";; |
|
67 | 66 |
esac |
68 | 67 |
|
69 | 68 |
# Some Linux distributions assign the hostname to 127.0.1.1 in order to be |
Also available in: Unified diff