From: Michael Prokop Date: Thu, 18 May 2017 15:00:41 +0000 (+0200) Subject: Disable automatic 'ATA over Ethernet discovery' X-Git-Tag: v0.29.5~11 X-Git-Url: http://git.grml.org/?p=grml-live.git;a=commitdiff_plain;h=fad6e2cc432ea47ba64a42b8d541f37127c2fd9a Disable automatic 'ATA over Ethernet discovery' /usr/lib/modules-load.d/aoetools.conf by default contains: | ## If you need to restrict the interfaces aoe will use, copy this | ## file to /etc/modules-load.d/ and use this example: | # aoe aoe_iflist="eth0,eth1" | | ## Load aoe driver with no interface restriction: | aoe and /lib/systemd/system/aoe-discover.service contains: | [Unit] | Description=ATA over Ethernet discovery | BindsTo=sys-devices-virtual-aoe-discover.device | DefaultDependencies=no | Conflicts=shutdown.target | After=network-online.target | | [Service] | Type=oneshot | ExecStart=/sbin/aoe-discover Since the aeotools.conf file tells systemd to load the aoe module which then triggers the udev rule we end up with automatic aoe-discover execution on default Grml boot, even though we disable the aoe-discover service (since enabling/disabling only affects starting via transitive dependencies, but the udev rule is doing the equivalent of `systemctl start $unit`). By removing /usr/lib/modules-load.d/aoetools.conf we ensure that automatic 'ATA over Ethernet discovery' is NOT executed, though if a user runs 'modprobe aoe' it executes aoe-discover as intended. Thanks: Felipe Sateler + Darshaka Pathirana for help in coming up with a solution Closes grml/grml#32 --- diff --git a/etc/grml/fai/config/scripts/GRMLBASE/55-aoetools b/etc/grml/fai/config/scripts/GRMLBASE/55-aoetools new file mode 100755 index 0000000..fdabd22 --- /dev/null +++ b/etc/grml/fai/config/scripts/GRMLBASE/55-aoetools @@ -0,0 +1,21 @@ +#!/bin/bash +# Filename: ${GRML_FAI_CONFIG}/config/scripts/GRMLBASE/55-aoetools +# Purpose: adjust aoetools configuration +# Authors: grml-team (grml.org), (c) Michael Prokop +# Bug-Reports: see http://grml.org/bugs/ +# License: This file is licensed under the GPL v2 or any later version. +################################################################################ + +set -u +set -e + +if ! [ -r "${target}/usr/lib/modules-load.d/aoetools.conf" ] ; then + echo "File /usr/lib/modules-load.d/aoetools.conf doesn't exist, skipping execution of script." + exit 0 +fi + +echo "Removing /usr/lib/modules-load.d/aoetools.conf to avoid automatic aoe discovery" +rm -f "${target}/usr/lib/modules-load.d/aoetools.conf" + +## END OF FILE ################################################################# +# vim:ft=sh expandtab ai tw=80 tabstop=4 shiftwidth=2