diff options
author | Jonathan Bauer | 2021-04-06 14:51:27 +0200 |
---|---|---|
committer | Jonathan Bauer | 2021-04-06 14:51:27 +0200 |
commit | d7fcfe67322bfce8d9d90ba8f18e5f51b308acb1 (patch) | |
tree | 2ef529504197abf77c4cc346ffac9f8d549cd8f9 | |
parent | Merge branch 'master' into installer (diff) | |
parent | [distro-logo] own module for distro logo (diff) | |
download | mltk-d7fcfe67322bfce8d9d90ba8f18e5f51b308acb1.tar.gz mltk-d7fcfe67322bfce8d9d90ba8f18e5f51b308acb1.tar.xz mltk-d7fcfe67322bfce8d9d90ba8f18e5f51b308acb1.zip |
Merge branch 'master' into installer
-rw-r--r-- | core/modules/distro-logo/module.build | 25 | ||||
-rw-r--r-- | core/modules/distro-logo/module.conf | 4 | ||||
-rw-r--r-- | core/rootfs/rootfs-stage32/module.build | 14 | ||||
l--------- | core/targets/bwlp/distro-logo | 1 | ||||
l--------- | core/targets/stage32-bwlp/distro-logo | 1 |
5 files changed, 31 insertions, 14 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="" diff --git a/core/rootfs/rootfs-stage32/module.build b/core/rootfs/rootfs-stage32/module.build index 2d7aaac3..d6760002 100644 --- a/core/rootfs/rootfs-stage32/module.build +++ b/core/rootfs/rootfs-stage32/module.build @@ -121,19 +121,5 @@ post_copy() { copy_kernel_modules copy_kernel - # 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/targets/bwlp/distro-logo b/core/targets/bwlp/distro-logo new file mode 120000 index 00000000..ab15c1bf --- /dev/null +++ b/core/targets/bwlp/distro-logo @@ -0,0 +1 @@ +../../modules/distro-logo
\ No newline at end of file diff --git a/core/targets/stage32-bwlp/distro-logo b/core/targets/stage32-bwlp/distro-logo new file mode 120000 index 00000000..ab15c1bf --- /dev/null +++ b/core/targets/stage32-bwlp/distro-logo @@ -0,0 +1 @@ +../../modules/distro-logo
\ No newline at end of file |