File tree Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Expand file tree Collapse file tree 1 file changed +12
-5
lines changed Original file line number Diff line number Diff line change @@ -41,15 +41,22 @@ SWAP_LOCK="/tmp/kUaL_lInUx_sWaP_mOuNtEd"
4141ROOTFS_LOCK=" /tmp/kUaL_lInUx_mOuNtEd"
4242INNER_TMP=" /tmp/kUaL_lInUx"
4343ROOTFS_TYPE=unknown
44- if [ -z " $( grep ' nodev.*ext4' /proc/filesystems) " ] && [ -n " $( grep ' ext4' /proc/filesystems) " ]; then
44+ cp rootfs.ext4.base tmp.test.fs.tmp || fail
45+ mkdir -p tmp.test.fs.dir || fail
46+ if [ -f fs.config ]; then
47+ ROOTFS_TYPE=" $( cat fs.config) "
48+ elif mount -o loop tmp.test.fs.tmp tmp.test.fs.dir 2> /dev/null; then
4549 echo " This kernel support ext4."
4650 ROOTFS_TYPE=ext4
47- elif [ -z " $( grep ' nodev.*ext3' /proc/filesystems) " ] && [ -n " $( grep ' ext3' /proc/filesystems) " ]; then
48- echo " This kernel support ext3 and doesn't support ext4."
49- ROOTFS_TYPE=ext3
51+ echo ext4 > fs.config
5052else
51- fail " This kernel doesn't support ext4 and ext3."
53+ echo " This kernel doesn't support ext4."
54+ ROOTFS_TYPE=ext3
55+ echo ext3 > fs.config
5256fi
57+ umount tmp.test.fs.tmp 2> /dev/null
58+ umount tmp.test.fs.dir 2> /dev/null
59+ rm -fr tmp.test.fs.tmp tmp.test.fs.dir 2> /dev/null
5360
5461baseus (){
5562 echo " $* " | sed ' s|^/mnt/us/|/mnt/base-us/|'
You can’t perform that action at this time.
0 commit comments