Bug 486251
Summary: | /sbin/dhclient-script has really strange code | ||
---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | Michal Jaegermann <michal> |
Component: | dhcp | Assignee: | David Cantrell <dcantrell> |
Status: | CLOSED RAWHIDE | QA Contact: | Fedora Extras Quality Assurance <extras-qa> |
Severity: | medium | Docs Contact: | |
Priority: | low | ||
Version: | rawhide | CC: | dcantrell, wwoods |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | All | ||
OS: | Linux | ||
Whiteboard: | |||
Fixed In Version: | Doc Type: | Bug Fix | |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2009-02-19 03:26:03 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: |
Description
Michal Jaegermann
2009-02-19 02:21:02 UTC
How is this: Index: dhclient-script =================================================================== RCS file: /cvs/pkgs/rpms/dhcp/devel/dhclient-script,v retrieving revision 1.5 diff -u -p -r1.5 dhclient-script --- dhclient-script 18 Feb 2009 04:12:59 -0000 1.5 +++ dhclient-script 19 Feb 2009 02:36:16 -0000 @@ -358,9 +358,8 @@ dhconfig() { if [ -d /etc/dhcp/dhclient.d ]; then for f in /etc/dhcp/dhclient.d/*.sh ; do if [ -x ${f} ]; then - subsystem="$(basename ${f} .sh)" - . ${f} - \${subsystem}_config + subsystem="${f%.sh}" + . ${f} "${subsystem}_config" fi done fi > How is this: ...
That will work just fine (if this was an intention).
As a matter of fact I did such change already on my copy of dhclient-script, as a "temporary" fix, and nothing bad happened. :-)
Very good, thanks. Will be fixed in dhcp-4.1.0-8.fc11 I really find shell scripts frustrating. I spend the majority of my time writing C or Python and when I have to do something simple in shell, I almost always fail. Oh well. BTW, this addition to dhclient-script is so that other services can latch on to the dhclient-script run by providing their own scripts in /etc/dhcp/dhclient.d. It's so I don't have to keep maintaining dhclient-script and updating for every little change to ntp, nis, and other such services that may be pulling info from the DHCP lease. > BTW, this addition to dhclient-script is so that other services can latch on to
> the dhclient-script
Yes, that how it looked to me. At least one of existing scripts, nis.sh, takes an argument but I was not entirely sure if a dhclient-script code resulted from a slip of a finger in an editor or you had in mind something fiendishly clever.
|