Browse code

Fixed return code in /etc/init.d/functions script (PR 2017492)

Change-Id: Ia4c0182806b00a3303b575b4508e4266d6ee25cc
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/4567
Tested-by: gerrit-photon <photon-checkins@vmware.com>
Reviewed-by: Anish Swaminathan <anishs@vmware.com>

dthaluru authored on 2017/12/27 08:30:40
Showing 2 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,11 @@
0
+--- a/rc.d/init.d/functions	2017-02-27 06:56:05.000000000 -0800
1
+@@ -60,7 +60,7 @@
2
+ 
3
+ if [ -z "${CONSOLETYPE:-}" ]; then
4
+     if [ -c "/dev/stderr" -a -r "/dev/stderr" ]; then
5
+-        CONSOLETYPE="$(/sbin/consoletype < /dev/stderr 2>/dev/null)"
6
++        CONSOLETYPE="$(/sbin/consoletype stdout < /dev/stderr 2>/dev/null)"
7
+     else
8
+         CONSOLETYPE="serial"
9
+     fi
... ...
@@ -3,21 +3,22 @@ Name:		initscripts
3 3
 Version:	9.70
4 4
 License:	GPLv2
5 5
 Group:		System Environment/Base
6
-Release:	1%{?dist}
6
+Release:	2%{?dist}
7 7
 URL:		https://github.com/fedora-sysv/initscripts
8 8
 Source0:	https://github.com/fedora-sysv/initscripts/archive/%{name}-%{version}.tar.gz
9 9
 %define sha1 initscripts=6e2ba0946fa2f175f576614d9374ad00266aec66
10 10
 Patch0:     service.patch
11
+Patch1:     fix_return_code_during_set_error.patch
11 12
 Vendor:     	VMware, Inc.
12 13
 Distribution:   Photon
13 14
 Requires:	systemd
14 15
 Requires:	iproute2
15
-BuildRequires:	glib-devel 
16
+BuildRequires:	glib-devel
16 17
 BuildRequires:	python2
17 18
 BuildRequires:	python2-libs
18
-BuildRequires:	popt-devel 
19
-BuildRequires:	gettext 
20
-BuildRequires:	pkg-config 
19
+BuildRequires:	popt-devel
20
+BuildRequires:	gettext
21
+BuildRequires:	pkg-config
21 22
 BuildRequires:	systemd
22 23
 Provides:	/sbin/service
23 24
 
... ...
@@ -46,6 +47,7 @@ Binaries of init network
46 46
 %prep
47 47
 %setup -q
48 48
 %patch0 -p1
49
+%patch1 -p1
49 50
 
50 51
 %build
51 52
 make
... ...
@@ -160,16 +162,18 @@ rm -rf %{buildroot}%{_prefix}/lib/systemd
160 160
 %{_sysconfdir}/profile.d/debug*
161 161
 
162 162
 %changelog
163
+*   Tue Dec 26 2017 Divya Thaluru <dthaluru@vmware.com> 9.70-2
164
+-   Fixed return code in /etc/init.d/functions bash script
163 165
 *   Mon Apr 3 2017 Dheeraj Shetty <dheerajs@vmware.com> 9.70-1
164 166
 -   Updated to version 9.70
165
-*	Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 9.65-2
166
--	GA - Bump release of all rpms
167
-* Fri Feb 12 2016 Divya Thaluru <dthaluru@vmware.com> 9.65-2
168
-- Fixing service script to start services using systemctl by default
167
+*   Tue May 24 2016 Priyesh Padmavilasom <ppadmavilasom@vmware.com> 9.65-2
168
+-   GA - Bump release of all rpms
169
+*   Fri Feb 12 2016 Divya Thaluru <dthaluru@vmware.com> 9.65-2
170
+-   Fixing service script to start services using systemctl by default
169 171
 *   Tue Jan 26 2016 Xiaolin Li <xiaolinl@vmware.com> 9.65-1
170 172
 -   Updated to version 9.65
171
-* Mon Jul 20 2015 Divya Thaluru <dthaluru@vmware.com> 9.63-1
172
-- Got Spec file from source tar ball and modified it to be compatible to build in Photon 
173
+*   Mon Jul 20 2015 Divya Thaluru <dthaluru@vmware.com> 9.63-1
174
+-   Got Spec file from source tar ball and modified it to be compatible to build in Photon
173 175
 * Mon May 18 2015 Lukáš Nykrýn <lnykryn@redhat.com> - 9.63-1
174 176
 - remove ipcalc, it has its own package now
175 177
 - network: tell NM to reload its configuration during start
... ...
@@ -1166,7 +1170,7 @@ ng
1166 1166
 - run rc.sysinit, /etc/rc in monitor mode (part of #184340)
1167 1167
 - use a better check for 'native' services (#190989, #110761, adapted
1168 1168
   from <matthias@rpmforge.net>)
1169
- 
1169
+
1170 1170
 * Tue Sep 19 2006 Bill Nottingham <notting@redhat.com> 8.41-1
1171 1171
 - fix network ipv6 hang (#207137, others)
1172 1172
 - rc.sysinit: change blkid.tab path to /etc/blkid/blkid.tab
... ...
@@ -1511,7 +1515,7 @@ ng
1511 1511
   for ipv6calc (<pb@bierenger.de>, <pekkas@netcore.fi>)
1512 1512
 - fix quoting in daemon() (#144634)
1513 1513
 - make sysctl be silent (#144483)
1514
- 
1514
+
1515 1515
 * Mon Jan  3 2005 Bill Nottingham <notting@redhat.com> 8.02-1
1516 1516
 - remove initlog, minilogd
1517 1517
 - add a flag to kmodule for use with kudzu's socket mode, use it
... ...
@@ -1695,7 +1699,7 @@ ng
1695 1695
 - rc.sysinit: remove devfs compat and the remaining 2.4 compat
1696 1696
 - ifup-wireless: support multiple keys (#127957)
1697 1697
 - fix firmware loading (#129155, <bnocera@redhat.com>)
1698
- 
1698
+
1699 1699
 * Tue Aug 24 2004 Karsten Hopp <karsten@redhat.de> 7.68-1
1700 1700
 - execute zfcfconf.sh if available (mainframe)
1701 1701
 
... ...
@@ -1715,7 +1719,7 @@ ng
1715 1715
 
1716 1716
 * Fri Aug 20 2004 Bill Nottingham <notting@redhat.com> 7.64-1
1717 1717
 - rc.d/rc.sysinit: check for dev file too (#130350)
1718
- 
1718
+
1719 1719
 * Thu Aug 19 2004 Than Ngo <than@redhat.com> 7.63-1
1720 1720
 - allow CBCP with own number (#125710)
1721 1721
 
... ...
@@ -2276,7 +2280,7 @@ ng
2276 2276
 * Mon Oct 29 2001 Than Ngo <than@redhat.com>
2277 2277
 - fix bug in channel bundling if MSN is missed
2278 2278
 - support DEBUG option
2279
- 
2279
+
2280 2280
 * Wed Sep 19 2001 Than Ngo <than@redhat.com>
2281 2281
 - don't show user name by DSL connection
2282 2282
 
... ...
@@ -2456,7 +2460,7 @@ ng
2456 2456
 * Wed Jun 27 2001 Than Ngo <than@redhat.com>
2457 2457
 - fix pap/chap authentication for syncppp
2458 2458
 - support ippp options
2459
- 
2459
+
2460 2460
 * Mon Jun 25 2001 Bill Nottingham <notting@redhat.com>
2461 2461
 - add ifup-wireless
2462 2462
 
... ...
@@ -3124,7 +3128,7 @@ ng
3124 3124
 - set macaddr before bootp
3125 3125
 - zero in the /var/run/utmpx file (gafton)
3126 3126
 - don't set hostname on ppp/slip (kills X)
3127
- 
3127
+
3128 3128
 * Wed Mar 17 1999 Bill Nottingham <notting@redhat.com>
3129 3129
 - exit ifup if pump fails
3130 3130
 - fix stupid errors in reading commands from subprocess