Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
S
swmodd
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
LCM
swmodd
Commits
8c18c557
Commit
8c18c557
authored
3 years ago
by
Vivek Dutta
Browse files
Options
Downloads
Patches
Plain Diff
Fix start of services on container start
parent
067e975c
No related branches found
No related tags found
1 merge request
!10
Fix iopsys template
Pipeline
#26463
passed
3 years ago
Stage: static_code_analysis
Stage: api_test
Changes
2
Pipelines
3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
scripts/opkg_offline.sh
+2
-2
2 additions, 2 deletions
scripts/opkg_offline.sh
templates/lxc-iopsys
+24
-12
24 additions, 12 deletions
templates/lxc-iopsys
with
26 additions
and
14 deletions
scripts/opkg_offline.sh
+
2
−
2
View file @
8c18c557
...
@@ -123,7 +123,7 @@ function install_package()
...
@@ -123,7 +123,7 @@ function install_package()
resolve_dependency
${
dep
}
resolve_dependency
${
dep
}
install_package
${
root
}
${
pkg
}
install_package
${
root
}
${
pkg
}
else
else
echo
"Installing package
${
pkg
}
"
log
"Installing package
${
pkg
}
"
copy_single_opkg
${
root
}
${
pkg
}
copy_single_opkg
${
root
}
${
pkg
}
fi
fi
}
}
...
@@ -138,5 +138,5 @@ if [ -z "${2}" ]; then
...
@@ -138,5 +138,5 @@ if [ -z "${2}" ]; then
exit
0
;
exit
0
;
fi
fi
echo
"
Preparing container for swmodd
"
echo
"
Installing pkg [
${
2
}
] with dependencies
"
install_package
${
1
}
${
2
}
install_package
${
1
}
${
2
}
This diff is collapsed.
Click to expand it.
templates/lxc-iopsys
+
24
−
12
View file @
8c18c557
...
@@ -53,6 +53,7 @@ install_busybox()
...
@@ -53,6 +53,7 @@ install_busybox()
${
rootfs
}
/etc/config
\
${
rootfs
}
/etc/config
\
${
rootfs
}
/etc/init.d
\
${
rootfs
}
/etc/init.d
\
${
rootfs
}
/etc/rc.d
\
${
rootfs
}
/etc/rc.d
\
${
rootfs
}
/etc/hotplug.d
\
${
rootfs
}
/bin
\
${
rootfs
}
/bin
\
${
rootfs
}
/sbin
\
${
rootfs
}
/sbin
\
${
rootfs
}
/usr/bin
\
${
rootfs
}
/usr/bin
\
...
@@ -141,10 +142,22 @@ EOF
...
@@ -141,10 +142,22 @@ EOF
chmod
+x
${
rootfs
}
/etc/init.d/boot
chmod
+x
${
rootfs
}
/etc/init.d/boot
cat
<<
EOF
>> "
${
rootfs
}
/bin/boot_lxc"
#!/bin/sh
for f in
\`
ls -1 /etc/init.d/
\`
; do
/etc/init.d/
\$
f enable
/etc/init.d/
\$
f start
done
/bin/login root
EOF
chmod
+x
${
rootfs
}
/bin/boot_lxc
cat
<<
EOF
>> "
${
rootfs
}
/etc/inittab"
cat
<<
EOF
>> "
${
rootfs
}
/etc/inittab"
::sysinit:/etc/init.d/rcS S boot
::sysinit:/etc/init.d/rcS S boot
::shutdown:/etc/init.d/rcS K shutdown
::shutdown:/etc/init.d/rcS K shutdown
console::
askfirst:/bin/login root
console::
respawn:/bin/boot_lxc
EOF
EOF
# writable and readable for other
# writable and readable for other
chmod
644
"
${
rootfs
}
/etc/inittab"
||
return
1
chmod
644
"
${
rootfs
}
/etc/inittab"
||
return
1
...
@@ -268,17 +281,16 @@ lxc.net.0.name = eth0
...
@@ -268,17 +281,16 @@ lxc.net.0.name = eth0
lxc.net.0.mtu = 1500
lxc.net.0.mtu = 1500
EOF
EOF
libdirs
=
"
\
libdirs
=
"lib"
lib
\
lib64
\
#cp -rf /lib/functions.sh ${rootfs}/lib/
usr/lib64"
#cp -rf /lib/functions ${rootfs}/lib/
#cp -rf /lib/preinit ${rootfs}/lib/
#cp -rf /lib/* ${rootfs}/lib/
for
dir
in
${
libdirs
}
;
do
#for dir in ${libdirs}; do
if
[
-d
"/
${
dir
}
"
]
&&
[
-d
"
${
rootfs
}
/
${
dir
}
"
]
;
then
# if [ -d "/${dir}" ] && [ -d "${rootfs}/${dir}" ]; then
echo
"lxc.mount.entry = /
${
dir
}
${
dir
}
none ro,bind 0 0"
>>
"
${
path
}
/config"
# echo "lxc.mount.entry = /${dir} ${dir} none ro,bind 0 0" >> "${path}/config"
fi
# fi
done
#done
echo
"lxc.mount.entry = /sys/kernel/security sys/kernel/security none ro,bind,optional 0 0"
>>
"
${
path
}
/config"
echo
"lxc.mount.entry = /sys/kernel/security sys/kernel/security none ro,bind,optional 0 0"
>>
"
${
path
}
/config"
}
}
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment