Another proposed implementation, based on the client IP: if [ "${HOSTNAME}" = "(none)" ]; then . /tmp/net-*.conf # this should be all in one line: echo "$IPV4ADDR.$IPV4NETMASK" | awk -F "." '{ print "ltsp" (($1%(256-$5)*256+$2%(256-$6))*256+$3%(256-$7))*256+$4%(256-$8) }' > /proc/sys/kernel/hostname fi
The calculations are to take into account only the part of the IP that has zeroes on the respective subnet mask bits. The end result is that the clients are numbered from ltsp0 to ltsp(#maxclients-1). In my opinion, those 2 proposed implementations (mac and ip based) are simple enough and cover most of the needs. So one of them could be the default, and the other one could be selected based on some lts.conf entry. Cheers, Alkis Georgopoulos -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org