|
|
@ -285,6 +285,7 @@ class OpenRCStrategy(GenericStrategy):
|
|
|
|
HOSTNAME_FILE = '/etc/conf.d/hostname'
|
|
|
|
HOSTNAME_FILE = '/etc/conf.d/hostname'
|
|
|
|
|
|
|
|
|
|
|
|
def get_permanent_hostname(self):
|
|
|
|
def get_permanent_hostname(self):
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
f = open(self.HOSTNAME_FILE, 'r')
|
|
|
|
f = open(self.HOSTNAME_FILE, 'r')
|
|
|
|
for line in f:
|
|
|
|
for line in f:
|
|
|
@ -299,6 +300,7 @@ class OpenRCStrategy(GenericStrategy):
|
|
|
|
return None
|
|
|
|
return None
|
|
|
|
|
|
|
|
|
|
|
|
def set_permanent_hostname(self, name):
|
|
|
|
def set_permanent_hostname(self, name):
|
|
|
|
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
try:
|
|
|
|
f = open(self.HOSTNAME_FILE, 'r')
|
|
|
|
f = open(self.HOSTNAME_FILE, 'r')
|
|
|
|
lines = [x.strip() for x in f]
|
|
|
|
lines = [x.strip() for x in f]
|
|
|
|