Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
server
virtinstaller
Commits
9ac3381e
Commit
9ac3381e
authored
May 21, 2016
by
Peter Niederlag
Browse files
[TASK] set server name as argument on call time
parent
396ccd4d
Changes
1
Hide whitespace changes
Inline
Side-by-side
virt-install-debian
View file @
9ac3381e
...
...
@@ -8,6 +8,21 @@ fi
source
$MACHINE_CONF_FILE
if
[
-z
"
$1
"
]
;
then
echo
"you must supply server name like srvXXX as argument"
exit
99
else
SERVER_NAME
=
$1
SERVER_IPV4_ADDRESS
=
$(
echo
"
$SERVER_NAME
"
|
sed
-r
-n
's/(srv)([0-9]{3})/\2/p'
)
if
[[
!
"
$SERVER_IPV4_ADDRESS
"
=
~ ^[0-9]
{
3
}
$
]]
;
then
echo
"Could not validate
$SERVER_IPV4_ADDRESS
"
exit
99
else
NET_IPV4_ADDRESS
=
"
$SERVER_IPV4_BLOCK
.
$SERVER_IPV4_ADDRESS
"
fi
fi
# we should now have the following variables
echo
"SERVER_NAME
$SERVER_NAME
"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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