forked from pool/hyper-v
- update hv_kvp_daemon
Use CLOEXEC when opening kvp_pool files Fix permissions of created directory and files Fix /var subdirectory (move state files from /var/opt to /var/lib) Fix string types OBS-URL: https://build.opensuse.org/package/show/Virtualization/hyper-v?expand=0&rev=53
This commit is contained in:
22
hyper-v.spec
22
hyper-v.spec
@@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package hyper-v
|
||||
#
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@@ -21,6 +21,7 @@
|
||||
Name: hyper-v
|
||||
ExclusiveArch: %ix86 x86_64
|
||||
PreReq: %insserv_prereq
|
||||
Requires(pre): coreutils
|
||||
Summary: Microsoft Hyper-V tools
|
||||
License: GPL-2.0
|
||||
Group: System/Kernel
|
||||
@@ -81,6 +82,25 @@ ln -sfvbn ../../etc/init.d/%{hv_kvp_daemon} $RPM_BUILD_ROOT/usr/sbin/rc%{hv_kvp_
|
||||
/usr/sbin/%{hv_kvp_daemon}
|
||||
/usr/lib/%{name}
|
||||
|
||||
%pre
|
||||
# hv_kvp_daemon in SLES11 SP2 stored temporary state files in /var/opt
|
||||
# move them to /var/lib and remove old directory, if possible.
|
||||
if test -d /var/opt/hyperv
|
||||
then
|
||||
if mkdir -p -v -m 0755 /var/lib/hyperv && pushd /var/lib/hyperv > /dev/null
|
||||
then
|
||||
for oldfile in /var/opt/hyperv/ifcfg-* /var/opt/hyperv/.kvp_pool_*
|
||||
do
|
||||
if test -e "${oldfile}"
|
||||
then
|
||||
mv -vfb "${oldfile}" . || :
|
||||
fi
|
||||
done
|
||||
popd > /dev/null
|
||||
fi
|
||||
rmdir -v /var/opt/hyperv || :
|
||||
fi
|
||||
|
||||
%post
|
||||
board_vendor=
|
||||
product_name=
|
||||
|
Reference in New Issue
Block a user