Accepting request 235401 from Virtualization
- copy mask2pfxlen from /etc/sysconfig/network/scripts/functions to hv_set_ifconfig (bnc#879256) - Start hyper-v helpers manually with helper script in inst-sys OBS-URL: https://build.opensuse.org/request/show/235401 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/hyper-v?expand=0&rev=22
This commit is contained in:
commit
c865e9c258
@ -1,3 +1,14 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon May 26 15:50:21 CEST 2014 - ohering@suse.de
|
||||||
|
|
||||||
|
- copy mask2pfxlen from /etc/sysconfig/network/scripts/functions
|
||||||
|
to hv_set_ifconfig (bnc#879256)
|
||||||
|
|
||||||
|
-------------------------------------------------------------------
|
||||||
|
Wed May 21 12:05:31 CEST 2014 - ohering@suse.de
|
||||||
|
|
||||||
|
- Start hyper-v helpers manually with helper script in inst-sys
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Thu Apr 10 19:19:04 CEST 2014 - ohering@suse.de
|
Thu Apr 10 19:19:04 CEST 2014 - ohering@suse.de
|
||||||
|
|
||||||
|
26
hyper-v.spec
26
hyper-v.spec
@ -195,6 +195,32 @@ EOF
|
|||||||
#
|
#
|
||||||
head -n 42 ${d}/*.rules
|
head -n 42 ${d}/*.rules
|
||||||
#
|
#
|
||||||
|
helper=inst_sys.sh
|
||||||
|
cat > $RPM_BUILD_ROOT${bindir}/${helper} <<EOF
|
||||||
|
#!/bin/bash
|
||||||
|
# Starting daemons via RUN== in udev rules is not supported.
|
||||||
|
# In inst-sys systemd is not used, so start all daemons manually.
|
||||||
|
if test -d /sys/bus/vmbus/devices
|
||||||
|
then
|
||||||
|
export PATH=${bindir}:\$PATH
|
||||||
|
echo -n "Starting hyper-v helpers:"
|
||||||
|
for i in \
|
||||||
|
%{hv_kvp_daemon} \
|
||||||
|
%{hv_vss_daemon} \
|
||||||
|
%{hv_fcopy_daemon}
|
||||||
|
do
|
||||||
|
if mkdir /run/\$i
|
||||||
|
then
|
||||||
|
echo -n " \$i"
|
||||||
|
\$i < /dev/null &
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
echo " ... done"
|
||||||
|
fi
|
||||||
|
EOF
|
||||||
|
chmod 755 $RPM_BUILD_ROOT${bindir}/${helper}
|
||||||
|
head -n 123 $RPM_BUILD_ROOT${bindir}/${helper}
|
||||||
|
#
|
||||||
%else
|
%else
|
||||||
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
mkdir -p $RPM_BUILD_ROOT/etc/init.d
|
||||||
install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/%{hv_kvp_daemon}
|
install -m755 %{S:11} $RPM_BUILD_ROOT/etc/init.d/%{hv_kvp_daemon}
|
||||||
|
@ -44,14 +44,37 @@ then
|
|||||||
fi
|
fi
|
||||||
# send subshell output to syslog
|
# send subshell output to syslog
|
||||||
(
|
(
|
||||||
f=/etc/sysconfig/network/scripts/functions
|
# copied from /etc/sysconfig/network/scripts/functions
|
||||||
if test -f ${f}
|
mask2pfxlen() {
|
||||||
then
|
local i octet width=0 mask=(${1//./ })
|
||||||
. ${f}
|
test ${#mask[@]} -eq 4 || return 1
|
||||||
else
|
for octet in 0 1 2 3
|
||||||
echo "MISSING ${f}"
|
do
|
||||||
exit 1
|
test "${mask[octet]}" -ge 0 -a "${mask[octet]}" -le 255 || return 1
|
||||||
fi
|
for i in 128 192 224 240 248 252 254 255
|
||||||
|
do
|
||||||
|
test ${mask[octet]} -ge $i && ((width++))
|
||||||
|
done
|
||||||
|
done
|
||||||
|
echo $width
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
|
pfxlen2mask() {
|
||||||
|
test -n "$1" || return 1
|
||||||
|
local o i n=0 adr=() len=$(($1))
|
||||||
|
for o in 0 1 2 3
|
||||||
|
do
|
||||||
|
adr[$o]=0
|
||||||
|
for i in 128 64 32 16 8 4 2 1
|
||||||
|
do
|
||||||
|
((n++ < len)) && ((adr[$o] = ${adr[$o]} + $i))
|
||||||
|
done
|
||||||
|
done
|
||||||
|
echo ${adr[0]}.${adr[1]}.${adr[2]}.${adr[3]}
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
# remove known config variables from environment
|
# remove known config variables from environment
|
||||||
unset HWADDR
|
unset HWADDR
|
||||||
unset BOOTPROTO
|
unset BOOTPROTO
|
||||||
|
Loading…
Reference in New Issue
Block a user