Skip to contentSkip to conversation

switch hotplug scripts to use /bin/sh

PATCH In review Martin Hicks 2 participants 3 messages Dec 4, 2003

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 switch hotplug scripts to use /bin/sh

Hi,

Is there any reason we can't make hotplug use /bin/sh instead of /bin/bash?

Using /bin/bash breaks busybox, which doesn't know what to do when it is called as /bin/bash.

Thanks,
mh

Signature · 2 lines
Martin Hicks                Wild Open Source Inc.
[email protected]     613-266-2296

Index: dasd.agent
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/dasd.agent,v retrieving revision 1.1

dasd.agent +1 -1
diff -u -p -r1.1 dasd.agent
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # Dasd hotplug policy agent for Linux 2.4 kernels
 #

Index: dasd.permissions
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/dasd.permissions,v retrieving revision 1.1

dasd.permissions +2 -2
diff -u -p -r1.1 dasd.permissions
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # Copyright (c) 2002 SuSE Linux AG, Nuremberg
 #
@@ -27,4 +27,4 @@ function dasd_permissions
 	*)
 	    die "dasd_permissions: don't know what permissions to give $NODE-$MAJOR-$MINOR-$MISC"
     esac
-}
\ No newline at end of file
+}

Index: ieee1394.agent
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/ieee1394.agent,v retrieving revision 1.10

ieee1394.agent +1 -1
diff -u -p -r1.10 ieee1394.agent
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # IEEE1394-specific hotplug policy agent.
 #

Index: input.agent
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/input.agent,v retrieving revision 1.1

input.agent +1 -1
diff -u -p -r1.1 input.agent
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # input-specific hotplug policy agent.
 #

Index: input.rc
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/input.rc,v retrieving revision 1.1

input.rc +1 -1
diff -u -p -r1.1 input.rc
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # input.rc	This loads handlers for those input devices
 #		that have drivers compiled in kernel

Index: net.agent
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/net.agent,v retrieving revision 1.15

net.agent +1 -1
diff -u -p -r1.15 net.agent
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # Network hotplug policy agent for Linux 2.4 kernels
 #

Index: pci.agent
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/pci.agent,v retrieving revision 1.13

pci.agent +1 -1
diff -u -p -r1.13 pci.agent
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # PCI-specific hotplug policy agent.
 #

Index: scsi.agent
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/scsi.agent,v retrieving revision 1.3

scsi.agent +1 -1
diff -u -p -r1.3 scsi.agent
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # SCSI hotplug agent for 2.5 kernels 
 #

Index: tape.agent
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/tape.agent,v retrieving revision 1.1

tape.agent +1 -1
diff -u -p -r1.1 tape.agent
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 ###############################################################################
 # Tape hotplug agent for Linux 2.4 kernels
 #

Index: tape.permissions
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/tape.permissions,v retrieving revision 1.1

tape.permissions +1 -1
diff -u -p -r1.1 tape.permissions
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # Copyright (c) 2002 IBM Development Germany, Boeblingen
 #

Index: usb.agent
===================================================================
RCS file: /cvsroot/linux-hotplug/admin/etc/hotplug/usb.agent,v retrieving revision 1.35

usb.agent +1 -1
diff -u -p -r1.35 usb.agent
@@ -1,4 +1,4 @@
-#!/bin/bash
+#!/bin/sh
 #
 # USB-specific hotplug policy agent.
 #
#1 lore raw
Quoted 2 lines · Martin Hicks

Is there any reason we can't make hotplug use /bin/sh instead of /bin/bash?

Yes, they use plenty of bashisms. OTOH Last week I sent to this mailing list a patch which removes them, which is just waiting for an hotplug maintainer to merge it.

Signature · 2 lines
ciao, |
Marco | [3466 co1mvGWx/HRRs]
#2 lore raw
In reply to Martin Hicks
Quoted 7 lines · Marco d'Itri
Quoted 2 lines · Martin Hicks

Is there any reason we can't make hotplug use /bin/sh instead of /bin/bash?

Yes, they use plenty of bashisms. OTOH Last week I sent to this mailing list a patch which removes them, which is just waiting for an hotplug maintainer to merge it.

Ah yes. I do remember seeing those patches now.

Thanks for cleaning this up.
mh

Signature · 15 lines
Martin Hicks                Wild Open Source Inc.
[email protected]     613-266-2296




-------------------------------------------------------
This SF.net email is sponsored by: IBM Linux Tutorials.
Become an expert in LINUX or just sharpen your skills.  Sign up for IBM's
Free Linux Tutorials.  Learn everything from the bash shell to sys admin.
Click now! http://ads.osdn.com/?ad_id78&alloc_id371&op=click
_______________________________________________
Linux-hotplug-devel mailing list  http://linux-hotplug.sourceforge.net
[email protected]
https://lists.sourceforge.net/lists/listinfo/linux-hotplug-devel