Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
L
lxc
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Chen Yisong
lxc
Commits
ce68d5b4
Commit
ce68d5b4
authored
Jan 14, 2014
by
Stéphane Graber
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
debian: Support ssh host keys regeneration
Signed-off-by:
Stéphane Graber
<
stgraber@ubuntu.com
>
Acked-by:
Serge E. Hallyn
<
serge.hallyn@ubuntu.com
>
parent
040f1c40
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
24 additions
and
0 deletions
+24
-0
lxc-debian.in
templates/lxc-debian.in
+24
-0
No files found.
templates/lxc-debian.in
View file @
ce68d5b4
...
@@ -93,6 +93,30 @@ EOF
...
@@ -93,6 +93,30 @@ EOF
chroot
$rootfs
/usr/sbin/update-rc.d
-f
hwclock.sh remove
chroot
$rootfs
/usr/sbin/update-rc.d
-f
hwclock.sh remove
chroot
$rootfs
/usr/sbin/update-rc.d
-f
hwclockfirst.sh remove
chroot
$rootfs
/usr/sbin/update-rc.d
-f
hwclockfirst.sh remove
# generate new SSH keys
if
[
-x
$rootfs
/var/lib/dpkg/info/openssh-server.postinst
]
;
then
cat
>
$rootfs
/usr/sbin/policy-rc.d
<<
EOF
#!/bin/sh
exit 101
EOF
chmod
+x
$rootfs
/usr/sbin/policy-rc.d
if
[
-f
$rootfs
/etc/init/ssh.conf
]
;
then
mv
$rootfs
/etc/init/ssh.conf
$rootfs
/etc/init/ssh.conf.disabled
fi
rm
-f
$rootfs
/etc/ssh/ssh_host_
*
key
*
DPKG_MAINTSCRIPT_PACKAGE
=
openssh
DPKG_MAINTSCRIPT_NAME
=
postinst
chroot
$rootfs
/var/lib/dpkg/info/openssh-server.postinst configure
sed
-i
"s/root@
$(
hostname
)
/root@
$hostname
/g"
$rootfs
/etc/ssh/ssh_host_
*
.pub
if
[
-f
"
$rootfs
/etc/init/ssh.conf.disabled"
]
;
then
mv
$rootfs
/etc/init/ssh.conf.disabled
$rootfs
/etc/init/ssh.conf
fi
rm
-f
$rootfs
/usr/sbin/policy-rc.d
fi
# set initial timezone as on host
# set initial timezone as on host
if
[
-f
/etc/timezone
]
;
then
if
[
-f
/etc/timezone
]
;
then
cat
/etc/timezone
>
$rootfs
/etc/timezone
cat
/etc/timezone
>
$rootfs
/etc/timezone
...
...
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