File tree Expand file tree Collapse file tree 5 files changed +15
-12
lines changed Expand file tree Collapse file tree 5 files changed +15
-12
lines changed Original file line number Diff line number Diff line change 1+ __author__ = 'desultory'
2+ __version__ = '0.1.0'
3+
4+
5+ def print_banner (self ) -> list [str ]:
6+ """ Prints the banner. Prints the kernel version if set """
7+ banner = [self .banner ]
8+ if kver := self .get ('kernel_version' ):
9+ banner .append (f"einfo 'Kernel version: { kver } '" )
10+ return banner
Original file line number Diff line number Diff line change 1+ banner = ' einfo "UGRD v$(readvar VERSION)"'
2+
3+ [imports .init_pre ]
4+ "ugrd.base.banner" = [ " print_banner" ]
Original file line number Diff line number Diff line change 11modules = [ " ugrd.base.core" ,
22 " ugrd.fs.mounts" ,
33 " ugrd.base.cmdline" ,
4+ " ugrd.base.banner" ,
45 " ugrd.kmod.kmod" ,
56 " ugrd.fs.cpio" ,
67 " ugrd.base.checks" ]
Original file line number Diff line number Diff line change 77from zenlib .util import contains , unset , NoDupFlatList
88
99
10- def print_banner (self ) -> list [str ]:
11- """ Prints the banner. Prints the kernel version if set """
12- banner = [self .banner ]
13- if kver := self .get ('kernel_version' ):
14- banner .append (f"einfo 'Kernel version: { kver } '" )
15- return banner
16-
17-
1810def detect_tmpdir (self ) -> None :
1911 """ Reads TMPDIR from the environment, sets it as the temporary directory. """
2012 from os import environ
Original file line number Diff line number Diff line change @@ -10,7 +10,6 @@ library_paths = [ "/lib64" ]
1010old_count = 1
1111
1212binaries = [ " /bin/bash" ]
13- banner = ' einfo "UGRD v$(readvar VERSION)"'
1413
1514[nodes .console ]
1615mode = 0o644
@@ -49,9 +48,6 @@ minor = 1
4948[imports .build_final ]
5049"ugrd.base.core" = [ " handle_usr_symlinks" ]
5150
52- [imports .init_pre ]
53- "ugrd.base.core" = [ " print_banner" ]
54-
5551[custom_parameters ]
5652hostonly = " bool" # If true, the initramfs will be built specifically for the host building it
5753validate = " bool" # If true, the configuration of the initramfs will be validated against the host
You can’t perform that action at this time.
0 commit comments