35 |
local socket |
local socket |
36 |
local cookie |
local cookie |
37 |
local authtype |
local authtype |
38 |
|
local networksvc |
39 |
|
|
40 |
[[ -z ${value} ]] && help_network_hostname && return 1 |
[[ -z ${value} ]] && help_network_hostname && return 1 |
41 |
|
|
65 |
# add the new hostname to the xauthority file |
# add the new hostname to the xauthority file |
66 |
x11runas "xauth add ${socket} ${authtype} ${cookie}" |
x11runas "xauth add ${socket} ${authtype} ${cookie}" |
67 |
fi |
fi |
68 |
|
|
69 |
|
# reload network configuration to inform a dhcp server about the changed hostname |
70 |
|
if is_provided systemd |
71 |
|
then |
72 |
|
networksvc="systemd-networkd" |
73 |
|
elif is_provided sysvinit |
74 |
|
networksvc="network" |
75 |
|
fi |
76 |
|
${MCORE_LIBDIR}/mcore-system-service --restart --service "${service}" ;; |
77 |
} |
} |
78 |
|
|
79 |
help_network_iface() |
help_network_iface() |