Bug 1414822

Summary: [Hyper-V][RHEL7]postinstall scriptlet contain "if [ $1 > 1 ] ; then" which creates an empty file /1
Product: Red Hat Enterprise Linux 7 Reporter: Vitaly Kuznetsov <vkuznets>
Component: hyperv-daemonsAssignee: Vitaly Kuznetsov <vkuznets>
Status: CLOSED ERRATA QA Contact: xuli <xuli>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.4CC: ailan, boyang, hhei, jingli, ldu, leiwang, xiaofwan, xuli, yacao, zdenek.juran
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: hyperv-daemons-0-0.30.20161211git.el7 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2017-08-01 16:15:47 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Vitaly Kuznetsov 2017-01-19 14:51:25 UTC
From https://bugzilla.redhat.com/show_bug.cgi?id=1412033:

Description of problem:
postinstall scriptlet of packages hypervfcopyd, hypervkvpd and hypervvssd contain the following line:

if [ $1 > 1 ] ; then

This line creates an empty file "/1" . The used syntax of "[" (see "man test") is wrong. The line should be changed in each of the listed packages to

if [ $1 -gt 1 ] ; then

Comment 2 Vitaly Kuznetsov 2017-01-26 09:58:42 UTC
*** Bug 1416527 has been marked as a duplicate of this bug. ***

Comment 3 xuli 2017-05-31 10:08:29 UTC
The script has been changed, also have done hyperv-daemons related functional test for RHEL 7.4 compose on Hyper-v 2016 and 2012R2 host, the test result is pass. 
So verify this bug as SanityOnly for package hyperv-daemons-0-0.30.20161211git.el7.

Comment 4 errata-xmlrpc 2017-08-01 16:15:47 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1882