hotplug uses some tools from gnused and coreutils
svn path=/nixpkgs/trunk/; revision=4493
This commit is contained in:
parent
d36b6a1898
commit
b21d747280
@ -12,6 +12,8 @@ preBuild() {
|
|||||||
mv etc/hotplug/tape.agent.tmp etc/hotplug/tape.agent
|
mv etc/hotplug/tape.agent.tmp etc/hotplug/tape.agent
|
||||||
|
|
||||||
sed -e "s^@bash\@^$bash^g" \
|
sed -e "s^@bash\@^$bash^g" \
|
||||||
|
"s^@gnused\@^$gnused^g" \
|
||||||
|
"s^@coreutils\@^$coreutils^g" \
|
||||||
< etc/hotplug.d/default/default.hotplug > etc/hotplug.d/default/default.hotplug.tmp
|
< etc/hotplug.d/default/default.hotplug > etc/hotplug.d/default/default.hotplug.tmp
|
||||||
mv etc/hotplug.d/default/default.hotplug.tmp etc/hotplug.d/default/default.hotplug
|
mv etc/hotplug.d/default/default.hotplug.tmp etc/hotplug.d/default/default.hotplug
|
||||||
}
|
}
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{stdenv, fetchurl, bash}:
|
{stdenv, fetchurl, bash, gnused, coreutils}:
|
||||||
|
|
||||||
stdenv.mkDerivation {
|
stdenv.mkDerivation {
|
||||||
name = "hotplug-2004_03_29";
|
name = "hotplug-2004_03_29";
|
||||||
@ -8,5 +8,5 @@ stdenv.mkDerivation {
|
|||||||
md5 = "167bd479a1ca30243c51ca088e0942b3";
|
md5 = "167bd479a1ca30243c51ca088e0942b3";
|
||||||
};
|
};
|
||||||
patches = [./hotplug-install-path.patch ./hotplug-install.patch ./hotplug-2004_03_29-bash.patch];
|
patches = [./hotplug-install-path.patch ./hotplug-install.patch ./hotplug-2004_03_29-bash.patch];
|
||||||
inherit bash;
|
inherit bash gnused coreutils;
|
||||||
}
|
}
|
||||||
|
@ -43,10 +43,28 @@ diff -ruN hotplug-2004_03_29/etc/hotplug/tape.permissions hotplug-2004_03_29.new
|
|||||||
#
|
#
|
||||||
diff -ruN hotplug-2004_03_29/etc/hotplug.d/default/default.hotplug hotplug-2004_03_29.new/etc/hotplug.d/default/default.hotplug
|
diff -ruN hotplug-2004_03_29/etc/hotplug.d/default/default.hotplug hotplug-2004_03_29.new/etc/hotplug.d/default/default.hotplug
|
||||||
--- hotplug-2004_03_29/etc/hotplug.d/default/default.hotplug 2004-03-26 23:34:34.000000000 +0100
|
--- hotplug-2004_03_29/etc/hotplug.d/default/default.hotplug 2004-03-26 23:34:34.000000000 +0100
|
||||||
+++ hotplug-2004_03_29.new/etc/hotplug.d/default/default.hotplug 2006-01-05 17:28:47.000000000 +0100
|
+++ hotplug-2004_03_29.new/etc/hotplug.d/default/default.hotplug 2006-01-05 18:35:55.000000000 +0100
|
||||||
@@ -1,4 +1,4 @@
|
@@ -1,4 +1,4 @@
|
||||||
-#!/bin/bash
|
-#!/bin/bash
|
||||||
+#!@bash@/bin/bash
|
+#!@bash@/bin/bash
|
||||||
#
|
#
|
||||||
# This version of /sbin/hotplug should works on most GNU/Linux systems
|
# This version of /sbin/hotplug should works on most GNU/Linux systems
|
||||||
# using Linux 2.2.18+ or 2.4.* kernels. On 2.2.*, only USB has such
|
# using Linux 2.2.18+ or 2.4.* kernels. On 2.2.*, only USB has such
|
||||||
|
@@ -32,7 +32,7 @@
|
||||||
|
|
||||||
|
# DEBUG=yes export DEBUG
|
||||||
|
|
||||||
|
-debug_mesg "arguments ($*) env (`env`)"
|
||||||
|
+debug_mesg "arguments ($*) @coreutils@/bin/env (`env`)"
|
||||||
|
|
||||||
|
#
|
||||||
|
# Only one required argument: event type type being dispatched.
|
||||||
|
@@ -47,7 +47,7 @@
|
||||||
|
|
||||||
|
AGENTS=""
|
||||||
|
for AGENT in /etc/hotplug/*.agent ; do
|
||||||
|
- TYPE=`basename $AGENT | sed s/.agent//`
|
||||||
|
+ TYPE=`@coreutils@/bin/basename $AGENT | @gnused@/bin/sed s/.agent//`
|
||||||
|
if [ -x $AGENT ]; then
|
||||||
|
AGENTS="$AGENTS $TYPE"
|
||||||
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user