Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
itminedu
snf-image
Commits
c334f836
Commit
c334f836
authored
Dec 12, 2011
by
Nikos Skalkotos
Browse files
Make helper fail is OSFAMILY property is missing
Also did a minor cleanup in AssignHostname task
parent
7ee2a43d
Changes
2
Hide whitespace changes
Inline
Side-by-side
snf-image-helper/snf-image-helper.in
View file @
c334f836
...
...
@@ -75,6 +75,11 @@ fi
trap
'{ umount "$target"; }'
ERR
if
[
-z
"
$SNF_IMAGE_PROPERTY_EXCLUDE_ALL_TASKS
"
]
;
then
if
[[
!
"
$SNF_IMAGE_PROPERTY_OSFAMILY
"
=
~ ^
(
linux|windows
)
$
]]
;
then
log_error
"Supported values for OSFAMILY propertry are: linux|windows"
fi
# Redirect standard error to standard output,
# prepend a timestamp before each line of output.
echo
"Execute all snf-image tasks...."
...
...
snf-image-helper/tasks/50AssignHostname.in
View file @
c334f836
...
...
@@ -56,14 +56,13 @@ linux_hostname() {
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment