3
0
Fork 0
forked from mirrors/nixpkgs

ifplugd: Remove

This package hasn't been updated in 11 years, and isn't really useful
anymore in a modern Linux system.
This commit is contained in:
Eelco Dolstra 2016-03-03 19:40:54 +01:00
parent 4927ca8397
commit 6bd0c3fe9d
5 changed files with 0 additions and 102 deletions

View file

@ -322,7 +322,6 @@
./services/networking/hostapd.nix
./services/networking/i2pd.nix
./services/networking/i2p.nix
./services/networking/ifplugd.nix
./services/networking/iodined.nix
./services/networking/ircd-hybrid/default.nix
./services/networking/kippo.nix

View file

@ -1,82 +0,0 @@
{ config, lib, pkgs, ... }:
with lib;
let
inherit (pkgs) ifplugd;
cfg = config.networking.interfaceMonitor;
# The ifplugd action script, which is called whenever the link
# status changes (i.e., a cable is plugged in or unplugged).
plugScript = pkgs.writeScript "ifplugd.action"
''
#! ${pkgs.stdenv.shell}
iface="$1"
status="$2"
${cfg.commands}
'';
in
{
###### interface
options = {
networking.interfaceMonitor.enable = mkOption {
type = types.bool;
default = false;
description = ''
If <literal>true</literal>, monitor Ethernet interfaces for
cables being plugged in or unplugged. When this occurs, the
commands specified in
<option>networking.interfaceMonitor.commands</option> are
executed.
'';
};
networking.interfaceMonitor.beep = mkOption {
type = types.bool;
default = false;
description = ''
If <literal>true</literal>, beep when an Ethernet cable is
plugged in or unplugged.
'';
};
networking.interfaceMonitor.commands = mkOption {
type = types.lines;
default = "";
description = ''
Shell commands to be executed when the link status of an
interface changes. On invocation, the shell variable
<varname>iface</varname> contains the name of the interface,
while the variable <varname>status</varname> contains either
<literal>up</literal> or <literal>down</literal> to indicate
the new status.
'';
};
};
###### implementation
config = mkIf cfg.enable {
systemd.services.ifplugd = {
description = "Network interface connectivity monitor";
after = [ "network-interfaces.target" ];
wantedBy = [ "multi-user.target" ];
script = ''
${ifplugd}/sbin/ifplugd --no-daemon --no-startup --no-shutdown \
${if config.networking.interfaceMonitor.beep then "" else "--no-beep"} \
--run ${plugScript}
'';
};
environment.systemPackages = [ ifplugd ];
};
}

View file

@ -1,16 +0,0 @@
{stdenv, fetchurl, pkgconfig, libdaemon}:
stdenv.mkDerivation {
name = "ifplugd-0.28";
src = fetchurl {
url = http://0pointer.de/lennart/projects/ifplugd/ifplugd-0.28.tar.gz;
sha256 = "1w21cpyzkr7igp6vsf4a0jwp2b0axs3kwjiapy676bdk9an58is7";
};
buildInputs = [pkgconfig libdaemon];
configureFlags = "--with-initdir=$out/etc/init.d --disable-lynx";
patches = [
# From http://sources.gentoo.org/viewcvs.py/*checkout*/gentoo-x86/sys-apps/ifplugd/files/ifplugd-0.28-interface.patch?rev=1.1.
./interface.patch
];
patchFlags = "-p0";
}

View file

@ -10242,8 +10242,6 @@ let
i7z = callPackage ../os-specific/linux/i7z { };
ifplugd = callPackage ../os-specific/linux/ifplugd { };
ima-evm-utils = callPackage ../os-specific/linux/ima-evm-utils { };
intel2200BGFirmware = callPackage ../os-specific/linux/firmware/intel2200BGFirmware { };

View file

@ -71,7 +71,6 @@ with import ./release-lib.nix { inherit supportedSystems; };
iana_etc = linux;
icewm = linux;
idutils = all;
ifplugd = linux;
inetutils = linux;
iputils = linux;
jnettop = linux;