File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change 11__author__ = 'desultory'
2- __version__ = '0.1 .0'
2+ __version__ = '0.2 .0'
33
44
55def parse_cmdline (self ) -> str :
@@ -12,4 +12,8 @@ def mount_cmdline_root(self) -> str:
1212 """ Returns bash script to mount root partition based on /proc/cmdline """
1313 mount_dest = self ['mounts' ]['root' ]['destination' ] if not self .get ('switch_root_target' ) else self ['switch_root_target' ]
1414 return ["echo 'Mounting root partition based on /proc/cmdline'" ,
15- f"mount $CMDLINE_ROOT { mount_dest } -o ro" ]
15+ f"mount $CMDLINE_ROOT { mount_dest } -o ro" ,
16+ 'if [ $? -ne 0 ]; then' ,
17+ ' echo "Failed to mount the root parition using /proc/cmdline"' ,
18+ ' mount_root' ,
19+ 'fi' ]
Original file line number Diff line number Diff line change @@ -8,3 +8,7 @@ mod_depends = ['ugrd.base.base']
88
99[masks ]
1010init_mount = [ " mount_root" ]
11+
12+ # Import this function to be used by mount_cmdline_root
13+ [imports .functions ]
14+ "ugrd.fs.mounts" = [ " mount_root" ]
You can’t perform that action at this time.
0 commit comments