File tree Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Expand file tree Collapse file tree 1 file changed +10
-0
lines changed Original file line number Diff line number Diff line change @@ -25,6 +25,13 @@ export LC_ALL=C
2525# ======================================
2626# Common Functions
2727# --------------------------------------
28+ function mountProc {
29+ if ! mountpoint -q /proc; then
30+ mount -t proc proc /proc
31+ trap " umount /proc" EXIT
32+ fi
33+ }
34+
2835function mountCgroups {
2936 mount -t tmpfs cgroup_root /sys/fs/cgroup
3037 for group in devices blkio cpuset pids; do
@@ -737,6 +744,7 @@ function baseCreateKernelTree {
737744 # /kernel-tree/ for stripping operations
738745 # ----
739746 echo " Creating copy of kernel tree for strip operations"
747+ mountProc
740748 mkdir -p /kernel-tree
741749 cp -a /lib/modules/* /kernel-tree/
742750}
@@ -747,6 +755,7 @@ function baseSyncKernelTree {
747755 # version from /kernel-tree/.
748756 # ----
749757 echo " Replace kernel tree with downsized version"
758+ mountProc
750759 rm -rf /lib/modules/*
751760 cp -a /kernel-tree/* /lib/modules/
752761 rm -rf /kernel-tree
@@ -764,6 +773,7 @@ function baseFixupKernelModuleDependencies {
764773 local module_info
765774 local dependency
766775 local module_files
776+ mountProc
767777 for kernel_dir in /kernel-tree/* ; do
768778 echo " Checking kernel dependencies for ${kernel_dir} "
769779 kernel_version=$( /usr/bin/basename " ${kernel_dir} " )
You can’t perform that action at this time.
0 commit comments