diff options
author | Jonathan Bauer | 2021-04-06 14:50:16 +0200 |
---|---|---|
committer | Jonathan Bauer | 2021-04-06 14:50:16 +0200 |
commit | 0a12361705965296fe6b8b66d9c8f577e81ac102 (patch) | |
tree | 1bcff4017ec61067afa955c1fc563e43c56bdd75 /core/modules | |
parent | [ntfsfree] dmsetup wait retry, log its output (diff) | |
download | mltk-0a12361705965296fe6b8b66d9c8f577e81ac102.tar.gz mltk-0a12361705965296fe6b8b66d9c8f577e81ac102.tar.xz mltk-0a12361705965296fe6b8b66d9c8f577e81ac102.zip |
[distro-logo] own module for distro logo
Diffstat (limited to 'core/modules')
-rw-r--r-- | core/modules/distro-logo/module.build | 25 | ||||
-rw-r--r-- | core/modules/distro-logo/module.conf | 4 |
2 files changed, 29 insertions, 0 deletions
diff --git a/core/modules/distro-logo/module.build b/core/modules/distro-logo/module.build new file mode 100644 index 00000000..4e30667f --- /dev/null +++ b/core/modules/distro-logo/module.build @@ -0,0 +1,25 @@ +#!/bin/bash +fetch_source() { + : +} + +build() { + : +} + +post_copy() { + # Try to fetch distro logo + if [ ! -s "$TARGET_BUILD_DIR/etc/distro.png" ]; then + local DIST=$(lsb_release -si) + if [ -n "$DIST" ]; then + [ -z "$CFG_DISTLOGO_URL" ] && CFG_DISTLOGO_URL='http://mltk-services.ruf.uni-freiburg.de/distro_logo.php?distro=' + wget -t 3 -T 3 -O "$TARGET_BUILD_DIR/etc/distro.png" "${CFG_DISTLOGO_URL}${DIST}" + if [ ! -s "$TARGET_BUILD_DIR/etc/distro.png" ]; then + rm -f "$TARGET_BUILD_DIR/etc/distro.png" + pwarning "Could not download distro-logo" + fi + else + pwarning "Could not determine distribution" + fi + fi +} diff --git a/core/modules/distro-logo/module.conf b/core/modules/distro-logo/module.conf new file mode 100644 index 00000000..33c7f30a --- /dev/null +++ b/core/modules/distro-logo/module.conf @@ -0,0 +1,4 @@ +#!/bin/bash +REQUIRED_BINARIES="sshd" +REQUIRED_LIBRARIES="" +REQUIRED_DIRECTORIES="" |