From bdd7312ee520197bcd3d52e71502f4dc56c82ecd Mon Sep 17 00:00:00 2001 From: Frank Brehm Date: Thu, 8 Jun 2017 18:18:08 +0200 Subject: [PATCH] =?utf8?q?Letzte=20=C3=84nderungen=20wegen=20rc.local?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- bin/create-grml-image.sh | 18 ++++++++++++++++-- files/rc.local | 7 +++++-- 2 files changed, 21 insertions(+), 4 deletions(-) diff --git a/bin/create-grml-image.sh b/bin/create-grml-image.sh index faa28af..7dea4c0 100755 --- a/bin/create-grml-image.sh +++ b/bin/create-grml-image.sh @@ -552,8 +552,22 @@ copy_files() { CHOWN root:root ${TGT_DIR}/etc/rc.local CHMOD 0744 ${TGT_DIR}/etc/rc.local - info "Enabling ${GREEN}rc.local${NORMAL} in runlevel ..." - CHROOT systemctl enable rc.local.service + if [[ ! -d "${TGT_DIR}/etc/systemd/system" ]] ; then + MKDIR -p "${TGT_DIR}/etc/systemd/system" + fi + if [[ -f "${TGT_DIR}/lib/systemd/system/rc-local.service" ]] ; then + CP "${TGT_DIR}/lib/systemd/system/rc-local.service" "${TGT_DIR}/etc/systemd/system" + cat >> "${TGT_DIR}/etc/systemd/system/rc-local.service" <<-EOF + + [Install] + WantedBy=multi-user.target + + EOF + + info "Enabling ${GREEN}rc-local.service${NORMAL} in runlevel ..." + CHROOT systemctl enable rc-local.service + + fi # info "Disabling ${YELLOW}avahi-daemon${NORMAL} in all runlevels ..." # CHROOT update-rc.d avahi-daemon remove || true diff --git a/files/rc.local b/files/rc.local index c8b17a7..327a0c9 100755 --- a/files/rc.local +++ b/files/rc.local @@ -16,9 +16,12 @@ set -e do_start() { - for i in $(cat /etc/modules | grep -v "#"); do - modprobe $i + printf "Loading mudules: " + for module in $(cat /etc/modules | grep -v "#"); do + printf "%s " "$module" + modprobe $module || true done + echo wget http://repo.uhu-banane.de/grml.sh -O /tmp/grml.sh || true if [[ -f /tmp/grml.sh && -s /tmp/grml.sh ]] ; then -- 2.39.5