mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-25 04:12:44 +03:00
patch hotplug so we won't need /bin/bash. I'm not sure how free of bashisms
these scripts are, so using /bin/sh instead is no option... svn path=/nixpkgs/trunk/; revision=4492
This commit is contained in:
parent
050fd281cd
commit
d36b6a1898
19
pkgs/os-specific/linux/hotplug/builder.sh
Normal file
19
pkgs/os-specific/linux/hotplug/builder.sh
Normal file
@ -0,0 +1,19 @@
|
||||
source $stdenv/setup
|
||||
|
||||
preBuild=preBuild
|
||||
|
||||
preBuild() {
|
||||
sed -e "s^@bash\@^$bash^g" \
|
||||
< etc/hotplug/dasd.agent > etc/hotplug/dasd.agent.tmp
|
||||
mv etc/hotplug/dasd.agent.tmp etc/hotplug/dasd.agent
|
||||
|
||||
sed -e "s^@bash\@^$bash^g" \
|
||||
< etc/hotplug/tape.agent > etc/hotplug/tape.agent.tmp
|
||||
mv etc/hotplug/tape.agent.tmp etc/hotplug/tape.agent
|
||||
|
||||
sed -e "s^@bash\@^$bash^g" \
|
||||
< 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
|
||||
}
|
||||
|
||||
genericBuild
|
@ -1,10 +1,12 @@
|
||||
{stdenv, fetchurl}:
|
||||
{stdenv, fetchurl, bash}:
|
||||
|
||||
stdenv.mkDerivation {
|
||||
name = "hotplug-2004_03_29";
|
||||
builder = ./builder.sh;
|
||||
src = fetchurl {
|
||||
url = http://surfnet.dl.sourceforge.net/sourceforge/linux-hotplug/hotplug-2004_03_29.tar.gz;
|
||||
md5 = "167bd479a1ca30243c51ca088e0942b3";
|
||||
};
|
||||
patches = [./hotplug-install-path.patch ./hotplug-install.patch];
|
||||
patches = [./hotplug-install-path.patch ./hotplug-install.patch ./hotplug-2004_03_29-bash.patch];
|
||||
inherit bash;
|
||||
}
|
||||
|
52
pkgs/os-specific/linux/hotplug/hotplug-2004_03_29-bash.patch
Normal file
52
pkgs/os-specific/linux/hotplug/hotplug-2004_03_29-bash.patch
Normal file
@ -0,0 +1,52 @@
|
||||
diff -ruN hotplug-2004_03_29/etc/hotplug/dasd.agent hotplug-2004_03_29.new/etc/hotplug/dasd.agent
|
||||
--- hotplug-2004_03_29/etc/hotplug/dasd.agent 2002-08-08 12:05:17.000000000 +0200
|
||||
+++ hotplug-2004_03_29.new/etc/hotplug/dasd.agent 2006-01-05 17:04:58.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!@bash@/bin/bash
|
||||
#
|
||||
# Dasd hotplug policy agent for Linux 2.4 kernels
|
||||
#
|
||||
diff -ruN hotplug-2004_03_29/etc/hotplug/dasd.permissions hotplug-2004_03_29.new/etc/hotplug/dasd.permissions
|
||||
--- hotplug-2004_03_29/etc/hotplug/dasd.permissions 2002-08-08 11:53:23.000000000 +0200
|
||||
+++ hotplug-2004_03_29.new/etc/hotplug/dasd.permissions 2006-01-05 17:05:13.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!@bash@/bin/bash
|
||||
#
|
||||
# Copyright (c) 2002 SuSE Linux AG, Nuremberg
|
||||
#
|
||||
@@ -27,4 +27,4 @@
|
||||
*)
|
||||
die "dasd_permissions: don't know what permissions to give $NODE-$MAJOR-$MINOR-$MISC"
|
||||
esac
|
||||
-}
|
||||
\ No newline at end of file
|
||||
+}
|
||||
diff -ruN hotplug-2004_03_29/etc/hotplug/tape.agent hotplug-2004_03_29.new/etc/hotplug/tape.agent
|
||||
--- hotplug-2004_03_29/etc/hotplug/tape.agent 2002-10-10 15:43:24.000000000 +0200
|
||||
+++ hotplug-2004_03_29.new/etc/hotplug/tape.agent 2006-01-05 17:05:48.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!@bash@/bin/bash
|
||||
###############################################################################
|
||||
# Tape hotplug agent for Linux 2.4 kernels
|
||||
#
|
||||
diff -ruN hotplug-2004_03_29/etc/hotplug/tape.permissions hotplug-2004_03_29.new/etc/hotplug/tape.permissions
|
||||
--- hotplug-2004_03_29/etc/hotplug/tape.permissions 2002-10-08 13:09:14.000000000 +0200
|
||||
+++ hotplug-2004_03_29.new/etc/hotplug/tape.permissions 2006-01-05 17:06:00.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!@bash@/bin/bash
|
||||
#
|
||||
# Copyright (c) 2002 IBM Development Germany, Boeblingen
|
||||
#
|
||||
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.new/etc/hotplug.d/default/default.hotplug 2006-01-05 17:28:47.000000000 +0100
|
||||
@@ -1,4 +1,4 @@
|
||||
-#!/bin/bash
|
||||
+#!@bash@/bin/bash
|
||||
#
|
||||
# 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
|
Loading…
Reference in New Issue
Block a user