summaryrefslogtreecommitdiffstats
path: root/installer
diff options
context:
space:
mode:
authorDirk von Suchodoletz2006-05-11 21:21:35 +0200
committerDirk von Suchodoletz2006-05-11 21:21:35 +0200
commit8fb05540f6e90b99053176b1ddf49c784b1336ea (patch)
tree822c2ab79d7f1008fb3d9dd2f12a9bd1e31c7b8b /installer
parentfix for debuglevel in ld4-inst, kdmrc in functions-9.3, ... (diff)
downloadcore-8fb05540f6e90b99053176b1ddf49c784b1336ea.tar.gz
core-8fb05540f6e90b99053176b1ddf49c784b1336ea.tar.xz
core-8fb05540f6e90b99053176b1ddf49c784b1336ea.zip
fixes and cleanups within installer, see #51 too
git-svn-id: http://svn.openslx.org/svn/openslx/ld4@210 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'installer')
-rw-r--r--installer/default_files/dhcpd.conf52
-rwxr-xr-xinstaller/ld4-inst49
2 files changed, 40 insertions, 61 deletions
diff --git a/installer/default_files/dhcpd.conf b/installer/default_files/dhcpd.conf
index bb80527b..1551b5d6 100644
--- a/installer/default_files/dhcpd.conf
+++ b/installer/default_files/dhcpd.conf
@@ -22,17 +22,7 @@ option hw-mouse code 252 = string;
option hw-graphic code 253 = string;
option hw-monitor code 254 = string;
-###################################################################
-##### #####
-##### !!! vendor identifier dependend settings !!! #####
-##### #####
-###################################################################
-
-class "Etherboot" {
- match if substring (option vendor-class-identifier, 0, 9) = "Etherboot";
- option motdline1 = "Welcome to Guru Labs classroom";
- option vendor-encapsulated-options 3c:09:45:74:68:65:72:62:6f:6f:74:ff;
-}
+# most of these options could be defined via machine-setup.default
###################################################################
##### #####
@@ -49,22 +39,6 @@ next-server @@@server@@@;
##### #####
###################################################################
# description for several options:
-# A. x-server-defs "de PS/2 psaux 96 100 1280x1024 nv 16"
-# - Sets several values for XFree86 V 4.0.X
-#
-# 1. keyboard de/us
-# 2. mouse typ PS/2/MouseMan/MicroSoft/...
-# 3. mouse device psaux/ttyS0X
-# 4. horiz. freq. monitor 40 - 96 (depending on monitor)
-# 5. vert. freq. monitor 56 -120 (depending on monitor)
-# 6. max. resolution
-# 7. graphic server module mga/i810/nv/ati/... (depends on hardware)
-# 8. display color depth 8/16/24
-#
-# you will need the x-display-manager because
-# it is required by dhclient.conf.
-# change "require" within this file
-#
# option x-display-manager server01,server02,server03;
# option netbios-name-servers 13.30.19.254;
# option ntp-servers ntps1,ntps2,ntps3;
@@ -108,26 +82,18 @@ group {
if substring(option vendor-class-identifier,0,3) = "PXE" {
allow booting;
- filename "/tftpboot/pxelinux.0"; }
+ filename "@@@tftpbootdir@@@/pxelinux.0"; }
elsif substring(option vendor-class-identifier,0,3) = "DXS" {
allow booting; }
elsif substring(option vendor-class-identifier,0,4) = "MSFT" {
allow booting; }
-# option start-x "windowmaker";
-# option start-xdmcp "no";
-# option start-rwhod "no";
-# option start-cron "no";
-# option start-snmp "no"; }
-# elsif substring(option vendor-class-identifier,0,9) = "Etherboot" {
-# allow booting;
-# filename "/nfsroot/dxs2/boot/bootimg"; }
- else { ignore booting; }
-
-# option root-path "/nfsroot/dxs2";
+# else { ignore booting; }
+
+# option root-path "@@@rootpath@@@";
option domain-name-servers 132.230.200.200,132.230.200.201;
- option domain-name "lp.ruf.uni-freiburg.de ruf.uni-freiburg.de uni-freiburg.de dxs.local";
+ option domain-name "dxs.site";
option ntp-servers 132.230.1.9;
- option crontab-entries "59 21 * * * root shutdown -h now";
+# option crontab-entries "59 21 * * * root shutdown -h now";
# option lpr-servers 10.22.9.254;
# option nis-servers 10.16.10.11;
# option nis-domain "linuxpc";
@@ -146,7 +112,6 @@ group {
# option hw-monitor "30-65kHz 58-76Hz 1280x1024";
# option hw-graphic "nv 15";
option bootlocal-script "";
- option o129 "vga=0x0317 apic";
###################################################################
##### #####
@@ -159,9 +124,6 @@ group {
option crontab-entries "";
# group specific options:
-# group ip management:
-###################################################################
-# Grafikstation
host example1 {
hardware ethernet 00:02:B3:8D:83:12;
fixed-address @@@example1@@@;
diff --git a/installer/ld4-inst b/installer/ld4-inst
index 75794cfe..beb71378 100755
--- a/installer/ld4-inst
+++ b/installer/ld4-inst
@@ -4,11 +4,11 @@
# cloning from rsync source for Diskless X Stations (v4.0)
#
# Author(s): Nico Dietrich, 04-04-2006
-# Dirk von Suchodoletz <dirk@goe.net>, 06-04-2006
+# Dirk von Suchodoletz <dirk@goe.net>, 11-06-2006
#
# Copyright: (c) 2003, 2006 - RZ Universitaet Freiburg
#
-# Version: 0.2.0d
+# Version: 0.2.0e
DEBUG=0
header() {
@@ -17,8 +17,8 @@ header() {
echo
}
-# This function makes the directory of this script to the present working directory
-# It is called within precheck()
+# This function makes the directory of this script to the present working
+# directory. It is called within precheck()
# Does also work when called by a symbolic link. Even works for nested links.
goto_script_dir()
{
@@ -27,7 +27,8 @@ goto_script_dir()
[ $DEBUG -ge 2 ] && echo $calleddetails
calleddir=${0%/*} # Strip the filename from path
- [ $DEBUG -ge 2 ] && echo "Wechsele ins Verzeichnis des aufgerufenen scripts/links ($calleddir)"
+ [ $DEBUG -ge 2 ] && echo "Changing into directory of called scripts/links \
+($calleddir)"
cd $calleddir
while index=`expr index "$calleddetails" "l"`;
@@ -77,8 +78,17 @@ precheck() {
# nfs-kernel-server, atftpd
# -> not needed for installation
+ # but should be checked here, so the admin has just to restart
}
+# bolean yes of different kinds of spelling
+isyes () {
+if [ "$1" = "yes" -o "$1" = "y" -o "$1" = "Y" -o "$1" = "Yes" ] ; then
+ return 0
+else
+ return 1
+fi
+}
# ask question variable_name default_value
ask() {
@@ -254,7 +264,7 @@ configure() {
# nfs / nbd / squash-fs?
ask "Would you like to use NBD? (y/N): " nbdyes $nbdyes
- if [ "$nbdyes" = "yes" -o "$nbdyes" = "y" -o "$nbdyes" = "Y" ] ; then
+ if isyes $nbdyes ; then
ask "Which kind of NBD export (ext2/squashfs)?: " nbdfs $nbdfs
fi
@@ -276,7 +286,9 @@ copy_system() {
cat $file distro-specs/exclude-common|grep -e "^+ " > /tmp/dxs-exclude-list
cat $file distro-specs/exclude-common|grep -e "^- " >> /tmp/dxs-exclude-list
- echo -e "\n\nSyncing system now\nPlease enter root password of client machine\n"
+ test -d ${rootdir} || mkdir -p ${rootdir}
+ echo -e "\n\nSyncing system now\nPlease enter root password of client \
+machine\n"
rsync -avDe ssh --delete --exclude-from=/tmp/dxs-exclude-list \
${rsyncsource} ${rootdir} || { echo "Rsync failed" ; exit 1 ; }
rm /tmp/dxs-exclude-list
@@ -285,7 +297,7 @@ copy_system() {
}
create_nbd() {
- if [ "$nbdyes" = "yes" -o "$nbdyes" = "y" -o "$nbdyes" = "Y" ] ; then
+ if isyes $nbdyes ; then
# TODO: mksquashfs (background process)
if [ "$nbdfs" = "squashfs" ] ; then
echo -e "\nGenerating SquashFS image ${rootdir}.squashfs (ca. 30 min.)"
@@ -338,7 +350,7 @@ create_initrd() {
# add nfs modules -f if nfs is choosen
fsmod=nfs
# add nbd module and the selected filesystem ontop
- [ -n "$nbdyes" ] && fsmod=$fsmod" nbd $nbdfs"
+ isyes "$nbdyes" && fsmod=$fsmod" nbd $nbdfs"
fsmod=" -f \"$fsmod\""
# one big initrd or several smaller "specialized" ones!?
@@ -369,19 +381,24 @@ setup_server () {
[ -d ${dxs_conf}/${dir} ] || mkdir -p ${dxs_conf}/${dir}
done
- # copy the client configuration default file and replace root_pw - machine-setup
- sed -e "s,@@@root_pw@@@,'${root_pw}'," \
- default_files/machine-setup.default > ${dxs_conf}/${dxs_client_conf}-${timestamp}
+ # copy the client configuration default file and replace root_pw -
+ # machine-setup
+ sed -e "s,@@@root_pw@@@,'${root_pw}'," default_files/machine-setup.default \
+ > ${dxs_conf}/${dxs_client_conf}-${timestamp}
# creating new configuration files in $dxs_conf
# dhcp
- sed -e "s,@@@server@@@,${server},g;s,@@@netname@@@,${netname},g" \
+ sed -e "s,@@@server@@@,${server},g;s,@@@tftpbootdir@@@,${tftpbootdir},g" \
-e "s,@@@netmask@@@,${netmask},g;s,@@@broadcast@@@,${broadcast},g" \
+ -e "s,@@@rootdir@@@,${rootdir},g;s,@@@netname@@@,${netname},g" \
default_files/dhcpd.conf > ${dxs_conf}/${dxs_dhcpd_conf}-${timestamp}
- # TODO: sed -e @@@example1@@@, netname+1 etc. - which ip addresses are safe to use?
+ # TODO: sed -e @@@example1@@@, netname+1 etc. - which ip addresses are
+ # safe to use?
# atftpd
- sed -e "s,@@@tftpbootdir@@@,${tftpbootdir}," default_files/${atftpd_conf_name} > ${dxs_conf}/${dxs_atftpd_conf}-${timestamp}
+ sed -e "s,@@@tftpbootdir@@@,${tftpbootdir}," \
+ default_files/${atftpd_conf_name} \
+ > ${dxs_conf}/${dxs_atftpd_conf}-${timestamp}
# nfs
echo -e "#/etc/exports - file generated by $0\n\
@@ -418,7 +435,7 @@ ${rootdir} ${netname}/${netmask}(ro,no_root_squash,async)" \
apic dhcp noldsc debug=$debuglevel vci=DXS\n\
ipappend 1\n" >> ${dxs_conf}/${dxs_pxedefault_conf}-${timestamp}
- if [ -n "$nbdyes" ] ; then
+ if isyes "$nbdyes" ; then
j=$j+1
# create configs for nbd/squashfs kernels too
echo -e "LABEL ${client_distro}-${current_kernel}-nbd\n\