File tree Expand file tree Collapse file tree 4 files changed +23
-9
lines changed Expand file tree Collapse file tree 4 files changed +23
-9
lines changed Original file line number Diff line number Diff line change 11__author__ = 'desultory'
2- __version__ = '1.1.1 '
2+ __version__ = '1.1.2 '
33
44_module_name = 'ugrd.crypto.cryptsetup'
55
@@ -101,7 +101,7 @@ def get_crypt_sources(self) -> list[str]:
101101
102102 check_command = [f'if [ -z "$CRYPTSETUP_SOURCE_{ name } " ]; then' ,
103103 f' echo "Unable to resolve device source for { name } "' ,
104- ' exec /init ' ,
104+ ' _mount_fail ' ,
105105 'else' ,
106106 f' echo "Resolved device source: $CRYPTSETUP_SOURCE_{ name } "' ,
107107 'fi' ]
Original file line number Diff line number Diff line change 11__author__ = 'desultory'
2- __version__ = '1.2.2 '
2+ __version__ = '1.3.0 '
33
44from pathlib import Path
55
@@ -173,7 +173,7 @@ def mount_fstab(self) -> list[str]:
173173 else :
174174 out += ["read -sr" ]
175175
176- out += ["mount -a || (echo 'Failed to mount fstab' ; echo 'Loaded modules:' ; lsmod ; echo 'Block devices:' ; blkid ; mount_fstab )" ]
176+ out += ["mount -a || (echo 'Failed to mount fstab' ; _mount_fail )" ]
177177 return out
178178
179179
@@ -281,3 +281,19 @@ def clean_mounts(self) -> list[str]:
281281 return ['umount -a' ] + umounts
282282
283283
284+ def _mount_fail (self ) -> list [str ]:
285+ """
286+ Generates init lines to run if the mount fails
287+ """
288+ return ['echo "Loaded modules:"' ,
289+ 'lsmod' ,
290+ 'echo "Block devices:"' ,
291+ 'blkid' ,
292+ 'echo "Mounts:"' ,
293+ 'mount' ,
294+ 'echo -e "\n \n \n Press enter to restart init\n \n \n "' ,
295+ 'read -sr' ,
296+ 'clean_mounts' ,
297+ 'exec /init' ]
298+
299+
Original file line number Diff line number Diff line change @@ -31,7 +31,7 @@ mount_wait = false
3131"ugrd.fs.mounts" = [ " mount_root" ]
3232
3333[imports .functions ]
34- "ugrd.fs.mounts" = [ " clean_mounts" ]
34+ "ugrd.fs.mounts" = [ " clean_mounts" , " _mount_fail " ]
3535
3636[custom_parameters ]
3737mounts = " dict" # Add the mounts property, used to define the mounts to be made in the fstab
Original file line number Diff line number Diff line change 11
22__author__ = "desultory"
3+ __version__ = "0.11.2"
4+
35
46from tomllib import load
57from typing import Union
1113
1214from ugrd .initramfs_dict import InitramfsConfigDict
1315
14- from importlib .metadata import version
15-
16- __version__ = version (__package__ )
17-
1816
1917@loggify
2018class InitramfsGenerator :
You can’t perform that action at this time.
0 commit comments