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
4a1bd8d6
Unverified
Commit
4a1bd8d6
authored
Aug 29, 2017
by
Dimitri John Ledkov
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
templates/ubuntu: conditionally move upstart ssh job, as it is now optional.
Mimic the code from the debian template. Signed-off-by:
Dimitri John Ledkov
<
xnox@ubuntu.com
>
parent
b7ab9e86
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
2 deletions
+9
-2
lxc-ubuntu.in
templates/lxc-ubuntu.in
+9
-2
No files found.
templates/lxc-ubuntu.in
View file @
4a1bd8d6
...
...
@@ -152,13 +152,20 @@ 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
*
mv
$rootfs
/etc/init/ssh.conf
$rootfs
/etc/init/ssh.conf.disabled
DPKG_MAINTSCRIPT_PACKAGE
=
openssh
DPKG_MAINTSCRIPT_NAME
=
postinst
chroot
$rootfs
/var/lib/dpkg/info/openssh-server.postinst configure
mv
$rootfs
/etc/init/ssh.conf.disabled
$rootfs
/etc/init/ssh.conf
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
...
...
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