Comments (4)
How do we get the domain? The hostname -d command will print it out, but only if the /etc/hosts has been updated correctly with the domain information. Is there any other way to determine server's domain?
from supportutils.
Hm, what about this?
domain=$(hostnamectl status | grep -Po '^\s*Static hostname: [^\.]+\.\K(.*)')
[[ -n ${domain} ]] && dig +noall +answer ${domain}. SOA
suse.de. 300 IN SOA dns1.suse.de. infra.suse.de. 2021072802 3600 7200 3024000 300
It's probably nonsense as each subdomain doesn't need to have a separate delegation (ie. SOA record). Maybe this?
myhost=$(hostnamectl status | grep -Po '^ *Static hostname: \K([[:alnum:]\.-]+)')
dig ${myhost}.
from supportutils.
I looked at this again, but hostnamectl does not get a domain name on my SLES15 SP3 server. It appears it's not configured unless the /etc/hosts is updated. I suppose we could ping suse.com, but then that might not be valid since some server won't have external access. I supposed supportconfig would have to check if it's own FQDN is configured in /etc/hosts and then ping it if found.
from supportutils.
I came to conclution this is odd feature request. Thx anyway.
from supportutils.
Related Issues (20)
- [RFE] show mtime of each included file HOT 3
- [RFE] include 'multipath -t' output in mpio.txt HOT 1
- lsblk output in fs-diskio.txt should be ascii HOT 2
- Move client logs in samba.txt after daemon logs HOT 3
- postfix support request HOT 4
- supportconfig from rescue mode - boot.txt and lsinitrd
- autofs - includes inside dir (+dir:<path>) HOT 1
- Request to add features column to supportconfig output, for easier/quicker matching. HOT 1
- get iSCSI initiator HOT 1
- iscsiadm iface dump HOT 1
- If rsyslog not installed collect more from journalctl HOT 1
- Request to add ip neigh command output to show ARP cache on recent systems HOT 1
- request to add systemctl status output for every running service HOT 5
- Request add all available CPU schedulers to support config HOT 1
- Some log files aren't "exported" (as expected) HOT 1
- Add information about IO scheduler HOT 2
- Modify usage of df command within supportconfig HOT 6
- gather all files in /etc/security/limits.d/ HOT 1
- include more yast and hardware related info HOT 5
- change -x OPTION to really be exclude only HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from supportutils.