centos6.spec-issue1417.patch

Nicolas AGIUS, 08/14/2012 04:55 PM

Download (830 Bytes)

View differences:

centos6.spec 2012-08-14 18:23:16.000000000 +0200
52 52
mkdir -p %{buildroot}/etc/init.d
53 53
cp share/etc/init.d/oned.centos %{buildroot}/etc/init.d/oned
54 54

  
55
PASSWORD=$(echo $RANDOM$(date '+%s')|md5sum|cut -d' ' -f1)
56
mkdir -p %{buildroot}/var/lib/one/.one
57
echo oneadmin:$PASSWORD > %{buildroot}/var/lib/one/.one/one_auth
58 55

  
59 56
%clean
60 57
%{__rm} -rf %{buildroot}
......
75 72
    /usr/bin/gpasswd -a oneadmin oneadmin > /dev/null
76 73
fi
77 74

  
75
if [ ! -e /var/lib/one/.one/one_auth ]; then
76
	PASSWORD=$(echo $RANDOM$(date '+%s')|md5sum|cut -d' ' -f1)
77
	mkdir -p /var/lib/one/.one
78
	echo oneadmin:$PASSWORD > /var/lib/one/.one/one_auth
79
	chown oneadmin.oneadmin /var/lib/one/.one/one_auth
80
fi
81

  
78 82
%post
79 83
if [ $1 = 1 ]; then
80 84
    /sbin/chkconfig --add oned >/dev/null