-
Notifications
You must be signed in to change notification settings - Fork 512
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Introduce CUSTOM_LOGO_TEXT env variable
- Loading branch information
Showing
3 changed files
with
6 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -303,9 +303,10 @@ def patch_npk_package(package,key_dict): | |
print(f"extract {squashfs_file} ...") | ||
run_shell_command(f"unsquashfs -d {extract_dir} {squashfs_file}") | ||
patch_squashfs(extract_dir,key_dict) | ||
logo = os.path.join(extract_dir,"nova/lib/console/logo.txt") | ||
run_shell_command(f"sudo sed -i '1d' {logo}") | ||
run_shell_command(f"sudo sed -i '8s#.*# [email protected] https://github.com/elseif/MikroTikPatch#' {logo}") | ||
if len(os.environ['CUSTOM_LOGO_TEXT']) > 0: | ||
logo = os.path.join(extract_dir,"nova/lib/console/logo.txt") | ||
run_shell_command(f"sudo sed -i '1d' {logo}") | ||
run_shell_command(f"sudo sed -i '8s#.*#{os.environ['CUSTOM_LOGO_TEXT']}#' {logo}") | ||
print(f"pack {extract_dir} ...") | ||
run_shell_command(f"rm -f {squashfs_file}") | ||
run_shell_command(f"mksquashfs {extract_dir} {squashfs_file} -quiet -comp xz -no-xattrs -b 256k") | ||
|