Magellan Linux

Diff of /mcore-src/trunk/mcore-tools/daemon/client/include/network.client.class

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1350 by niro, Thu Feb 17 21:20:09 2011 UTC revision 1351 by niro, Thu Feb 17 21:44:18 2011 UTC
# Line 23  set_network_hostname() Line 23  set_network_hostname()
23  {  {
24   local value="$1"   local value="$1"
25   local CONFIG   local CONFIG
26     local socket
27     local cookie
28     local authtype
29    
30   [[ -z ${value} ]] && help_network_hostname && return 1   [[ -z ${value} ]] && help_network_hostname && return 1
31    
32   CONFIG="/etc/hostname"   CONFIG="/etc/hostname"
33   clearconfig   clearconfig
34   addconfig "${value}"   addconfig "${value}"
35   hostname "${value}"   hostname "${value}"
36    
37     # check for running x11 and recreate the xauth cookie with the correct hostname
38     if [[ ! -z $(pidof X) ]]
39     then
40     socket="${value}/unix${MCORE_XORG_DISPLAY}"
41     cookie=$(x11runas "xauth list | sed 's:.*\ \(.*\):\1:'")
42     authtype="MIT-MAGIC-COOKIE-1"
43     # add the new hostname to the xauthority file
44     x11runas "xauth add ${socket} ${authtype} ${cookie}"
45     fi
46  }  }
47    
48  help_network_iface()  help_network_iface()
# Line 130  help_network_nameserver() Line 144  help_network_nameserver()
144   mecho "get network.nameserver"   mecho "get network.nameserver"
145   mecho " displays the current nameserver of the system"   mecho " displays the current nameserver of the system"
146   mecho   mecho
147   mecho "set network.dns [ip1] [ip2] .. [ipN]"   mecho "set network.nameserver [ip1] [ip2] .. [ipN]"
148   mecho " adds given ips as nameserver to the system"   mecho " adds given ips as nameserver to the system"
149  }  }
150    

Legend:
Removed from v.1350  
changed lines
  Added in v.1351