Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
openSUSE:Leap:42.2:Update
lbdb
lbdb-hostname.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File lbdb-hostname.diff of Package lbdb
Index: lbdb-0.34/lbdb_lib.sh.in =================================================================== --- lbdb-0.34.orig/lbdb_lib.sh.in +++ lbdb-0.34/lbdb_lib.sh.in @@ -55,21 +55,18 @@ lbdb_hostname() if test "x$MAIL_DOMAIN_NAME" != "x" ; then hn=$MAIL_DOMAIN_NAME elif test -f /etc/mailname; then - hn=`cat /etc/mailname` + read hn < /etc/mailname else hn="" if test -r /etc/resolv.conf ; then - hn="`sed -n -e 's/^[ ]*domain[ ]\{1,\}\([^ ]*\)/\1/p' /etc/resolv.conf`" - if test "x$hn" = "x" ; then - hn="`sed -n -e 's/^[ ]*search[ ]\{1,\}\([^ ]*\)/\1/p' /etc/resolv.conf`" - fi + hn=`awk '/^#/{next}($1 == "search" || $1 == "domain" ) && $2 != "" {print $2;exit}' < /etc/resolv.conf` fi if test "x$hn" = "x" ; then hn=`lbdb_hn_sendmail` if test "x$hn" = "xNONE" ; then for i in /etc/HOSTNAME /etc/hostname ; do if test -f $i ; then - hn="`cat $i`" + read hn < $i break; fi done
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor