[Ovirt-devel] Re: [PATCH node-image] Fixes errors in /sbin/dhclient-script.
Alan Pevec
apevec at redhat.com
Thu Jan 22 23:50:50 UTC 2009
David Lutterkort wrote:
> On Thu, 2009-01-22 at 16:58 -0500, Darryl L. Pierce wrote:
>> All instances of "mv" are replaced by "cp -a". Four specific instances
>> of rm are removed entirely.
>>
>> Signed-off-by: Darryl L. Pierce <dpierce at redhat.com>
>> ---
>> common-post.ks | 8 ++++++++
>> 1 files changed, 8 insertions(+), 0 deletions(-)
>>
>> diff --git a/common-post.ks b/common-post.ks
>> index 151cc95..826a82f 100644
>> --- a/common-post.ks
>> +++ b/common-post.ks
>> @@ -78,3 +78,11 @@ cat > /etc/sysconfig/iptables << \EOF
>> -A FORWARD -m physdev ! --physdev-is-bridged -j REJECT --reject-with icmp-host-prohibited
>> COMMIT
>> EOF
>> +
>> +# remove errors from /sbin/dhclient-script
>> +DHSCRIPT=/sbin/dhclient-script
>> +sed -i 's/mv/cp -a/g' $DHSCRIPT
>> +sed -i 's/rm -f.*${interface}//' $DHSCRIPT
>> +sed -i 's/rm -f \/etc\/localtime//' $DHSCRIPT
>> +sed -i 's/rm -f \/etc\/ntp.conf//' $DHSCRIPT
>> +sed -i 's/rm -f \/etc\/yp.conf//' $DHSCRIPT
>
> This looks really fishy ... first off, why isn't this applied as a
> patch ? Replacing all occurences of 'mv' in some script just seems like
> asking for trouble.
to make it more precise, in pushed commit I put /mv /cp -a /
> Is there any discussion with upstream to address the underlying issue ?
> (I assume it's that dhclient ties itslef into a knot on ro /etc)
yes, rm and mv fail on bindmounted files which are setup by stateless support in rc.sysinit
Not sure if upstream is interested in this use-case, but we'll start discussion.
More information about the ovirt-devel
mailing list