[systemd-devel] How do you set the machine's domain name with systemd?

Larry Baker baker at usgs.gov
Mon Feb 11 09:55:30 PST 2013


On my Arch Linux ARM system, everything can be set in /etc/network.d/wired-eth0.  By default, the version of /etc/network.d/wired-eth0 is for DHCP.  I switched that to the version for a fixed IP address first:

> # cd /etc/network.d
> # mv wired-eth0{,.orig}
> # cp examples/ethernet-static ./wired-eth0

Then I customized it for my system (IPv4 only):

> # vi /etc/network.d/wired-eth0

> # Set DECnet MAC address for host address 54.147, ALLMULTI
> PRE_UP='ip link set eth0 address AA:00:04:00:93:D8 allmulticast on'
> 
> CONNECTION='ethernet'
> DESCRIPTION='A basic static ethernet connection using iproute'
> INTERFACE='eth0'
> IP='static'
> ADDR='130.118.44.225'
> NETMASK='255.255.252.0'
> #ROUTES=('192.168.0.0/24 via 192.168.1.2')
> GATEWAY='130.118.44.1'
> HOSTNAME='sheeva'
> DNS=('130.118.4.2 130.118.4.7')
> 
> ## For IPv6 autoconfiguration
> #IP6=stateless
> 
> ## For IPv6 static address configuration
> #IP6='static'
> #ADDR6=('1234:5678:9abc:def::1/64' '1234:3456::123/96')
> #ROUTES6=('abcd::1234')
> #GATEWAY6='1234:0:123::abcd'

Larry Baker
US Geological Survey
650-329-5608
baker at usgs.gov



On 10 Feb 2013, at 11:41 AM, Adam Nielsen wrote:

> Hi all,
> 
> I have just switched my Arch Linux machine to systemd and it mostly works, but I'm encountering a few issues.
> 
> For one, all my NFS mounts are failing, and it seems to be because I have granted permission via domain name, and since switching to systemd my machine no longer has a domain name, so I'm getting access denied errors:
> 
> $ cat /etc/hostname
> korath
> 
> $ hostname
> korath
> 
> $ hostname -s
> localhost
> 
> $ hostname -f
> localhost.localdomain
> 
> Why is the short name being reported as localhost?  How can I change the domain to my actual domain name instead of "localdomain"?  According to all the documentation, the domain name should not be specified in /etc/hostname - so where should it go?
> 
> Many thanks,
> Adam.
> 
> _______________________________________________
> systemd-devel mailing list
> systemd-devel at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/systemd-devel

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/systemd-devel/attachments/20130211/b914ace9/attachment.html>


More information about the systemd-devel mailing list