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
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