Changeset View
Changeset View
Standalone View
Standalone View
pykolab/constants.py.in
Show First 20 Lines • Show All 44 Lines • ▼ Show 20 Lines | COMPONENTS = [ | ||||
'mta' | 'mta' | ||||
] | ] | ||||
hostname = socket.gethostname() | hostname = socket.gethostname() | ||||
fqdn = socket.getfqdn() | fqdn = socket.getfqdn() | ||||
try: | try: | ||||
domain_parts = fqdn.split('.') | domain_parts = fqdn.split('.') | ||||
if len(domain_parts) < 3: | if len(domain_parts) < 3: | ||||
print >> sys.stderr, _("WARNING") + ": " + _("The Fully Qualified Domain Name or FQDN for this system is incorrect. Falling back to 'localdomain'.") | print(_("WARNING") + ": " + _("The Fully Qualified Domain Name or FQDN for this system is incorrect. Falling back to 'localdomain'."), file=sys.stderr) | ||||
domainname = "localdomain" | domainname = "localdomain" | ||||
else: | else: | ||||
domainname = '.'.join(domain_parts[1:]) | domainname = '.'.join(domain_parts[1:]) | ||||
except IndexError: | except IndexError: | ||||
domainname = "localdomain" | domainname = "localdomain" | ||||
# The system RC directory | # The system RC directory | ||||
RC_DIR = "/etc/rc.d/init.d/" | RC_DIR = "/etc/rc.d/init.d/" | ||||
▲ Show 20 Lines • Show All 65 Lines • Show Last 20 Lines |