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
89dd4bff
Commit
89dd4bff
authored
Sep 18, 2017
by
Stéphane Graber
Committed by
GitHub
Sep 18, 2017
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #1805 from tenforward/fix_plamo
plamo: Delete unnecessary process during container shutdown
parents
329414e0
d3953cdc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
2 deletions
+12
-2
lxc-plamo.in
templates/lxc-plamo.in
+12
-2
No files found.
templates/lxc-plamo.in
View file @
89dd4bff
...
@@ -186,7 +186,8 @@ configure_plamo() {
...
@@ -186,7 +186,8 @@ configure_plamo() {
# glibc configure
# glibc configure
mv
$rootfs
/etc/ld.so.conf
{
.new,
}
mv
$rootfs
/etc/ld.so.conf
{
.new,
}
chroot
$rootfs
ldconfig
chroot
$rootfs
ldconfig
echo
"Please change root password!"
# delete unnecessary process from rc.S
ed -
$rootfs
/etc/rc.d/rc.S <<-
"EOF"
ed -
$rootfs
/etc/rc.d/rc.S <<-
"EOF"
/^mount
-w
-n
-t
proc/
;
/^mkdir
\/
dev
\/
shm/-1d
/^mount
-w
-n
-t
proc/
;
/^mkdir
\/
dev
\/
shm/-1d
/^mknod
\/
dev
\/
null/
;
/^# Clean
\/
etc
\/
mtab/-2d
/^mknod
\/
dev
\/
null/
;
/^# Clean
\/
etc
\/
mtab/-2d
...
@@ -194,13 +195,22 @@ configure_plamo() {
...
@@ -194,13 +195,22 @@ configure_plamo() {
/^# Check the integrity/
;
/^# Clean up temporary/-1d
/^# Check the integrity/
;
/^# Clean up temporary/-1d
w
w
EOF
EOF
# /etc/rc.d/rc.M
# delete unnecessary process from rc.M
ed -
$rootfs
/etc/rc.d/rc.M <<-
"EOF"
ed -
$rootfs
/etc/rc.d/rc.M <<-
"EOF"
/^# Screen blanks/
;
/^# Initialize ip6tables/-1d
/^# Screen blanks/
;
/^# Initialize ip6tables/-1d
/^# Initialize sysctl/
;
/^echo
"Starting services/-1d
/^# Initialize sysctl/
;
/^echo
"Starting services/-1d
/^sync/;/^# All done/-1d
/^sync/;/^# All done/-1d
w
w
EOF
EOF
# delete unnecessary process from rc.6
ed -
$rootfs
/etc/rc.d/rc.6 <<- "
EOF
"
/^# Save system time/;/^# Unmount any remote filesystems/-1d
/^# Turn off swap/;/^# See if this is a powerfail situation/-1d
w
EOF
# /etc/rc.d/rc.inet1.tradnet
# /etc/rc.d/rc.inet1.tradnet
head -n-93
$rootfs
/sbin/netconfig.tradnet > /tmp/netconfig.rconly
head -n-93
$rootfs
/sbin/netconfig.tradnet > /tmp/netconfig.rconly
cat <<- EOF >> /tmp/netconfig.rconly
cat <<- EOF >> /tmp/netconfig.rconly
...
...
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