diff options
| author | smccroskey <smccroskey@cumulusnetworks.com> | 2017-04-27 19:39:24 -0700 |
|---|---|---|
| committer | smccroskey <smccroskey@cumulusnetworks.com> | 2017-04-28 03:04:50 -0700 |
| commit | 20701ca33a643179f8d86c2f3bb06403e17c0602 (patch) | |
| tree | 595ae18ccb258b9e46efd9a158f20bbef9279216 | |
| parent | f9e0332e10bd618dedff581d55326dd0515bdbe3 (diff) | |
redhat: use %initsystem check that works when chrooted
`systemctl' returns different, non-useful output while in a chroot.
Switch to checking if /sbin/init is a symlink to the systemd binary.
With this change the build works in a mock chroot.
Signed-off-by: Silas McCroskey <smccroskey@cumulusnetworks.com>
| -rw-r--r-- | redhat/frr.spec.in | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/redhat/frr.spec.in b/redhat/frr.spec.in index d1684672f7..3f39f007e6 100644 --- a/redhat/frr.spec.in +++ b/redhat/frr.spec.in @@ -49,7 +49,7 @@ #### Check for systemd or init.d (upstart) # Check for init.d (upstart) as used in CentOS 6 or systemd (ie CentOS 7) -%{expand: %%global initsystem %(if [[ `/sbin/init --version 2> /dev/null` =~ upstart ]]; then echo upstart; elif [[ `systemctl` =~ -\.mount ]]; then echo systemd; fi)} +%{expand: %%global initsystem %(if [[ `/sbin/init --version 2> /dev/null` =~ upstart ]]; then echo upstart; elif [[ `file /sbin/init` =~ "symbolic link to \`../lib/systemd/systemd'" ]]; then echo systemd; fi)} # # If init system is systemd, then always disable watchfrr # |
