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
62e97e7f
Commit
62e97e7f
authored
Oct 30, 2013
by
Nikos Skalkotos
Browse files
Fix DeleteSSHKeys to work on non-linux systems
parent
1722e242
Changes
1
Hide whitespace changes
Inline
Side-by-side
snf-image-helper/tasks/40DeleteSSHKeys.in
View file @
62e97e7f
...
...
@@ -41,7 +41,9 @@ if [ "$SNF_IMAGE_PROPERTY_OSFAMILY" = "windows" ]; then
exit
0
fi
distro
=
$(
get_base_distro
"
$SNF_IMAGE_TARGET
"
)
if
[
"
$SNF_IMAGE_PROPERTY_OSFAMILY
"
=
"linux"
]
;
then
distro
=
$(
get_base_distro
"
$SNF_IMAGE_TARGET
"
)
fi
HOST_KEY
=
"/etc/ssh/ssh_host_key"
RSA_KEY
=
"/etc/ssh/ssh_host_rsa_key"
...
...
@@ -50,10 +52,12 @@ ECDSA_KEY="/etc/ssh/ssh_host_ecdsa_key"
target
=
"
$SNF_IMAGE_TARGET
"
mount
-o
bind
/proc
"
$target
/proc"
add_cleanup umount
"
$target
/proc"
mount
-o
bind
/dev
"
$target
/dev"
add_cleanup umount
"
$target
/dev"
if
[
"x
$distro
"
=
"xdebian"
]
;
then
mount
-o
bind
/proc
"
$target
/proc"
add_cleanup umount
"
$target
/proc"
mount
-o
bind
/dev
"
$target
/dev"
add_cleanup umount
"
$target
/dev"
fi
#Remove the default keys
for
pair
in
"
$HOST_KEY
@rsa1"
"
$RSA_KEY
@rsa"
"
$DSA_KEY
@dsa"
"
$ECDSA_KEY
@ecdsa"
;
do
...
...
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