License

Copyright (C) 2008-2017 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".

Introduction

This documentation comes with ABSOLUTELY NO WARRANTY, to the extent permitted by applicable law.

Howto: Thinclient - Profiling for Gentoo Linux

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:

Changes in /gtc/test/etc/thinclient/default-profile/start.sh

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.09
Issued by olli
Beginning line 2

Default script for configuring, the system



Changes in /gtc/test/etc/thinclient/global-profile/start.sh

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.09
Issued by olli
Beginning line 2

User 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 && hwclock --systohc
 echo "Printserver"
 echo "
BrowseRemoteProtocols DNSSD,CUPS
BrowsePoll gabosh:631
" >/etc/cups/cups-browsed.conf
 chmod 600 /etc/cups/cups-browsed.conf
 /etc/init.d/cupsd restart
 /etc/init.d/cups-browsed restart
 echo "Scannerserver"
 echo "gabosh" >> /etc/sane.d/net.conf
 chmod 644 /etc/sane.d/net.conf
fi
echo "Loading VirtualBox Modules"
for m in vbox{drv,netadp,netflt}; do modprobe $m; done
echo "Edit /etc/hosts"
cat /etc/hosts-to-add >>/etc/hosts

Changes in /gtc/test/etc/thinclient/startup/gtc-startupconfig

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.09
Issued by olli
Beginning line 190

Start 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 listing
File Index

Here 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.

Edit Howto

About / Impressum

Click here for About / Impressum

Wishlist

If you want to support my work you can find my Amazon whishlist here