]> git.ipfire.org Git - thirdparty/asterisk.git/commitdiff
make config: os-release output error.
authorRodrigo Ramírez Norambuena <a@rodrigoramirez.com>
Thu, 16 Aug 2018 14:04:36 +0000 (11:04 -0300)
committerRodrigo Ramirez Norambuena <a@rodrigoramirez.com>
Wed, 29 Aug 2018 13:26:39 +0000 (08:26 -0500)
Fix not show the error
"/bin/sh: /etc/os-release: No such file or directory" when the command
'make config' is run in a System without systemv.

The instruction 'make config' pre execute the syntax
"$(shell . /etc/os-release && echo $$ID)" to identified if system is a
Slackware and Opensuse.

This change prevent show the message and is send to the /dev/null

Change-Id: I7f43e281a8d9405b2519fc653de82d9b8b645fdf

Makefile

index af1083dccec202e749bd5320cc0bbf6b4e4a9cde..db7ecfcb0c066d5909efe7a34529bddff7e5a407 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -949,7 +949,7 @@ config:
                if [ -z "$(DESTDIR)" ] ; then \
                        /sbin/chkconfig --add asterisk ; \
                fi ; \
-       elif [ -f /etc/os-release ] && [ "opensuse" = "$(shell . /etc/os-release && echo $$ID)" ] ; then \
+       elif [ -f /etc/os-release ] && [ "opensuse" = "$(shell . /etc/os-release 2>/dev/null && echo $$ID)" ] ; then \
                ./build_tools/install_subst contrib/init.d/rc.suse.asterisk  "$(DESTDIR)/etc/init.d/asterisk"; \
                if [ ! -f /etc/sysconfig/asterisk ] ; then \
                        $(INSTALL) -m 644 contrib/init.d/etc_default_asterisk "$(DESTDIR)/etc/sysconfig/asterisk" ; \
@@ -961,7 +961,7 @@ config:
                ./build_tools/install_subst contrib/init.d/rc.archlinux.asterisk  "$(DESTDIR)/etc/init.d/asterisk"; \
        elif [ -f /etc/slackware-version ]; then \
                ./build_tools/install_subst contrib/init.d/rc.slackware.asterisk  "$(DESTDIR)/etc/rc.d/rc.asterisk"; \
-       elif [ -f /etc/os-release ] && [ "slackware" = "$(shell . /etc/os-release && echo $$ID)" ] ; then \
+       elif [ -f /etc/os-release ] && [ "slackware" = "$(shell . /etc/os-release 2>/dev/null && echo $$ID)" ] ; then \
                ./build_tools/install_subst contrib/init.d/rc.slackware.asterisk  "$(DESTDIR)/etc/rc.d/rc.asterisk"; \
        elif [ -d "$(DESTDIR)/Library/LaunchDaemons" ]; then \
                if [ ! -f "$(DESTDIR)/Library/LaunchDaemons/org.asterisk.asterisk.plist" ]; then \