apparently uname is used in a few more scripts. Expect more updates to this

package, since it is rather keen on hardcoded paths, also to configuration
information and where it can find scripts. However, testing has to be done
on NixOS, making the process a bit slow...ish...

svn path=/nixpkgs/trunk/; revision=4496
This commit is contained in:
Armijn Hemel 2006-01-05 17:55:52 +00:00
parent a5a7f117c6
commit 057ef85775
2 changed files with 65 additions and 1 deletions

View File

@ -11,6 +11,22 @@ preBuild() {
< etc/hotplug/tape.agent > etc/hotplug/tape.agent.tmp
mv etc/hotplug/tape.agent.tmp etc/hotplug/tape.agent
sed -e "s^@coreutils\@^$coreutils^g" \
< etc/hotplug/hotplug.functions > etc/hotplug/hotplug.functions.tmp
mv etc/hotplug/hotplug.functions.tmp etc/hotplug/hotplug.functions
sed -e "s^@coreutils\@^$coreutils^g" \
< etc/hotplug/input.rc > etc/hotplug/input.rc.tmp
mv etc/hotplug/input.rc.tmp etc/hotplug/input.rc
sed -e "s^@coreutils\@^$coreutils^g" \
< etc/hotplug/pci.rc > etc/hotplug/pci.rc.tmp
mv etc/hotplug/pci.rc.tmp etc/hotplug/pci.rc
sed -e "s^@coreutils\@^$coreutils^g" \
< etc/hotplug/usb.rc > etc/hotplug/usb.rc.tmp
mv etc/hotplug/usb.rc.tmp etc/hotplug/usb.rc
sed -e "s^@bash\@^$bash^g" \
-e "s^@gnused\@^$gnused^g" \
-e "s^@coreutils\@^$coreutils^g" \

View File

@ -23,6 +23,42 @@ diff -ruN hotplug-2004_03_29/etc/hotplug/dasd.permissions hotplug-2004_03_29.new
-}
\ No newline at end of file
+}
diff -ruN hotplug-2004_03_29/etc/hotplug/hotplug.functions hotplug-2004_03_29.new/etc/hotplug/hotplug.functions
--- hotplug-2004_03_29/etc/hotplug/hotplug.functions 2004-03-29 21:25:59.000000000 +0200
+++ hotplug-2004_03_29.new/etc/hotplug/hotplug.functions 2006-01-05 18:48:13.000000000 +0100
@@ -13,7 +13,7 @@
# DEBUG=yes; export DEBUG
PATH=/bin:/sbin:/usr/sbin:/usr/bin
-KERNEL=`uname -r`
+KERNEL=`@coreutils/bin/uname -r`
MODULE_DIR=/lib/modules/$KERNEL
HOTPLUG_DIR=/etc/hotplug
diff -ruN hotplug-2004_03_29/etc/hotplug/input.rc hotplug-2004_03_29.new/etc/hotplug/input.rc
--- hotplug-2004_03_29/etc/hotplug/input.rc 2004-03-26 23:34:34.000000000 +0100
+++ hotplug-2004_03_29.new/etc/hotplug/input.rc 2006-01-05 18:50:39.000000000 +0100
@@ -119,7 +119,7 @@
: not supported currently
;;
status)
- echo $"INPUT status for kernel: " `uname -srm`
+ echo $"INPUT status for kernel: " `@coreutils@/bin/uname -srm`
echo ''
echo "INPUT devices:"
diff -ruN hotplug-2004_03_29/etc/hotplug/pci.rc hotplug-2004_03_29.new/etc/hotplug/pci.rc
--- hotplug-2004_03_29/etc/hotplug/pci.rc 2004-03-26 23:34:24.000000000 +0100
+++ hotplug-2004_03_29.new/etc/hotplug/pci.rc 2006-01-05 18:50:53.000000000 +0100
@@ -70,7 +70,7 @@
# echo $"pci stop -- ignored"
;;
status)
- echo $"PCI Status for kernel: " `uname -srm`
+ echo $"PCI Status for kernel: " `@coreutils/bin/uname -srm`
echo ''
if [ -f /proc/bus/pci/devices ]; then
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
@ -41,9 +77,21 @@ diff -ruN hotplug-2004_03_29/etc/hotplug/tape.permissions hotplug-2004_03_29.new
#
# Copyright (c) 2002 IBM Development Germany, Boeblingen
#
diff -ruN hotplug-2004_03_29/etc/hotplug/usb.rc hotplug-2004_03_29.new/etc/hotplug/usb.rc
--- hotplug-2004_03_29/etc/hotplug/usb.rc 2004-03-29 21:34:30.000000000 +0200
+++ hotplug-2004_03_29.new/etc/hotplug/usb.rc 2006-01-05 18:51:06.000000000 +0100
@@ -331,7 +331,7 @@
maybe_stop_usb
;;
status)
- echo $"USB Status for kernel: " `uname -srm`
+ echo $"USB Status for kernel: " `@coreutils@/bin/uname -srm`
echo ''
if [ -f /proc/bus/usb/devices ]; then
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 18:35:55.000000000 +0100
+++ hotplug-2004_03_29.new/etc/hotplug.d/default/default.hotplug 2006-01-05 18:47:30.000000000 +0100
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!@bash@/bin/bash