Copyright (C) 2008-2020 Oliver Bohlen.
Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or any later version published by the Free Software Foundation; with no Invariant Sections, no Front-Cover Texts, and no Back-Cover Texts.
A copy of the license is included in the section entitled "GNU Free Documentation License".
This documentation comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.
If you have multiple, different diskless clients running from the same NFS-Share you have to find a way to add different Startup profiles for the clients.
Here is an example how I manage this problem.
If you want to use this solution you need the following howto(s) finished:
File permissions:
Owner: root
Group: root
Permissions: -rwxr-xr-x
Click here for a download of the complete file: /gtc/test/etc/thinclient/default-profile/start.sh
Changed on 13.10.09Default script for configuring, the system
File permissions:
Owner: root
Group: root
Permissions: -rwxr-xr-x
Click here for a download of the complete file: /gtc/test/etc/thinclient/global-profile/start.sh
Changed on 13.10.09User defineable script for the global GTC profile
#!/bin/bash if ping -c1 gabosh | grep "64 bytes from" >/dev/null 2>&1 then echo "Setting Date/Time" ntpdate gabosh >/dev/null 2>&1 && hwclock --systohc >/dev/null 2>&1 # echo "Printserver" # echo " #BrowseRemoteProtocols DNSSD,CUPS #CreateIPPPrinterQueues Everywhere #BrowsePoll gabosh:631 #" >/etc/cups/cups-browsed.conf # chmod 600 /etc/cups/cups-browsed.conf # /etc/init.d/cupsd restart >/dev/null 2>&1 # /etc/init.d/cups-browsed restart >/dev/null 2>&1 # echo "Scannerserver" # echo "gabosh" >> /etc/sane.d/net.conf # chmod 644 /etc/sane.d/net.conf echo "Netzwerkdrucker" lpadmin -p "EPSON_WF_4740" -E -v ipp://XXX.XXX.XXX.XXX/ipp/print -m lsb/usr/epson-inkjet-printer-escpr/Epson-WF-4640_Series-epson-escpr-en.ppd -D "EPSON WorkForce-4740" -L "bei Becky, user1 und Jonah" fi echo "Edit /etc/hosts" cat /etc/hosts-to-add >>/etc/hosts
File permissions:
Owner: root
Group: root
Permissions: -r-x------
Click here for a download of the complete file: /gtc/test/etc/thinclient/startup/gtc-startupconfig
Changed on 16.06.09Start the individual startscript for this host.
if cat /proc/cmdline | grep " gtcserver" >/dev/null then echo -e "\n==============================\nLoading Server profile\n==============================\n" rsync -a$RSYNC_OPT /etc/thinclient/server-profile/etc/ /etc/ . /etc/thinclient/server-profile/start.sh fi echo -e "\n==============================\nRunning global start script\n==============================\n" # Run global Start script . /etc/thinclient/global-profile/start.sh # Sync individual /etc if exists if [ -d "/etc/thinclient/profiles/`hostname`" ] then echo -e "\n==============================\nRunning profile start script\n==============================\n" # Run individual start-Script if exists if [ -f "/etc/thinclient/profiles/`hostname`/start.sh" ] then chmod 755 /etc/thinclient/profiles/`hostname`/start.sh . /etc/thinclient/profiles/`hostname`/start.sh fi # Don't run the default profile if this is a Server if cat /proc/cmdline | grep " gtcserver" >/dev/null then exit 0 fi else # Don't run the default profile if this is a Server if cat /proc/cmdline | grep " gtcserver" >/dev/null then exit 0 fi if cat /proc/cmdline | grep " gtcinstall" >/dev/null then echo -e "\n==============================\nStarting GTC installation\n==============================\n" /etc/thinclient/scripts/gtc-install else echo -e "\n==============================\nLoading default profile\n==============================\n" rsync -a$RSYNC_OPT /etc/thinclient/default-profile/etc/ /etc/ . /etc/thinclient/default-profile/start.sh fi fi
Please send a feedback to: doc<at>gabosh.net
Howto listingHere you can find the official Gentoo Linux Forums where you can find a lot of answers.
Here a link to the official Gentoo Linux Homepage.