From 2cc69c394e140fcac62015286f4ce088c3863bf6 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Mon, 21 Aug 2006 11:37:53 +0000 Subject: * replaced all occurrences of 'opendiskless' with 'openslx' git-svn-id: http://svn.openslx.org/svn/openslx/trunk@320 95ad53e4-c205-0410-b2fa-d234c58c8868 --- Makefile | 40 +++++++++--------- initrd/initrd-stuff/bin/servconfig | 26 ++++++------ initrd/initrd-stuff/init | 42 +++++++++---------- initrd/mkdxsinitrd | 84 +++++++++++++++++++------------------- installer/ld4-inst | 48 +++++++++++----------- tools/tar_exclude_from | 2 +- 6 files changed, 121 insertions(+), 121 deletions(-) diff --git a/Makefile b/Makefile index b5d2801a..6c51cdd8 100644 --- a/Makefile +++ b/Makefile @@ -1,46 +1,46 @@ # Description: Makefile for creating project tarball and installing the project -# to the various destination directories +# to the various destination directories # -# Author(s): Lars Mueller , 11-08-2006 +# Author(s): Lars Mueller , 11-08-2006 # Dirk von Suchodoletz , 20-08-2006 # -# Copyright: (c) 2006 - opendiskless.org project +# Copyright: (c) 2006 - openslx.org project # # Version: 0.0.1c tarball: @echo "Creating tar ball " - @tar cfhj opendiskless.tar.bz2 \ + @tar cfhj openslx.tar.bz2 \ --exclude-from=tools/tar_exclude_from \ . install: - @echo "Installing opendiskless.org project files" - @mkdir -p /var/lib/opendiskless/config/default/initramfs \ - -p /var/lib/opendiskless/config/default/rootfs \ - -p /var/lib/opendiskless/db \ - -p /var/lib/opendiskless/stage1 \ - -p /usr/share/opendiskless/distro-specs \ - -p /usr/share/opendiskless/templates \ - -p /usr/share/opendiskless/initramfs + @echo "Installing openslx.org project files" + @mkdir -p /var/lib/openslx/config/default/initramfs \ + -p /var/lib/openslx/config/default/rootfs \ + -p /var/lib/openslx/db \ + -p /var/lib/openslx/stage1 \ + -p /usr/share/openslx/distro-specs \ + -p /usr/share/openslx/templates \ + -p /usr/share/openslx/initramfs @cp initrd/mkdxsinitrd /usr/local/sbin - @cp -a initrd/initrd-stuff/* /usr/share/opendiskless/initramfs - @cp -a initrd/distro-specs/* /usr/share/opendiskless/distro-specs + @cp -a initrd/initrd-stuff/* /usr/share/openslx/initramfs + @cp -a initrd/distro-specs/* /usr/share/openslx/distro-specs @cp installer/default_files/machine-setup.default \ - /usr/share/opendiskless/templates + /usr/share/openslx/templates @echo -e "#!/bin/sh\n#\n# This script allows the local admin to \ extend the\n# capabilities at the beginning of the initramfs (stage3). \ The toolset is rather\n# restricted and you have to keep in mind that \ stage4 rootfs has the\n# prefix '/mnt'." \ - > /var/lib/opendiskless/config/default/initramfs/preinit.local + > /var/lib/openslx/config/default/initramfs/preinit.local @echo -e "#!/bin/sh\n#\n# This script allows the local admin to \ extend the\n# capabilities at the end of the initramfs (stage3). The \ toolset is rather\n# restricted and you have to keep in mind that stage4 \ rootfs has the\n# prefix '/mnt'." \ - > /var/lib/opendiskless/config/default/initramfs/postinit.local - @chmod u+x /var/lib/opendiskless/config/default/initramfs/*init.local + > /var/lib/openslx/config/default/initramfs/postinit.local + @chmod u+x /var/lib/openslx/config/default/initramfs/*init.local #uninstall: -# @echo -e "Uninstalling opendiskless.org project files but keeping configs \ +# @echo -e "Uninstalling openslx.org project files but keeping configs \ #and stage1\nfiles (please remove manually)" -# @rm -rf /usr/share/opendiskless +# @rm -rf /usr/share/openslx # @rm /usr/local/sbin/mkdxsinitrd diff --git a/initrd/initrd-stuff/bin/servconfig b/initrd/initrd-stuff/bin/servconfig index d3bbf8a4..28ae881f 100755 --- a/initrd/initrd-stuff/bin/servconfig +++ b/initrd/initrd-stuff/bin/servconfig @@ -2,16 +2,16 @@ # # Description: universal (distro independent) configuration script # for linux diskless clients (executed within initial -# ramdisk) +# ramdisk) # # Author(s): Dirk von Suchodoletz , 20-08-2006 # Michael Janczyk , 31-05-2006 -# Lars Mueller , 23-06-2006 -# Oliver Tappe , 23-06-2006 +# Lars Mueller , 23-06-2006 +# Oliver Tappe , 23-06-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg -# (c) 2006 - opendiskless.org project -# +# (c) 2006 - openslx.org project +# # Version: 0.1.2c # check for configuration files to source @@ -59,14 +59,14 @@ echo " ">/mnt/etc/issue ####################################################################### -# read and unify configuration options - default configuration file, +# read and unify configuration options - default configuration file, # from dhcp, ldap ... # wait for the appearance of configuration from several sources cfgcomplete . /etc/machine-setup # copy additional configuration and var files and directories -# admins can place there files in /var/lib/opendiskless/config/... +# admins can place there files in /var/lib/openslx/config/... # to be packed during stage2 into (/srv/dxs)/tftpboot/client-config...) # ... in the near future ... cp -a /rootfs/* /mnt 2>/dev/null @@ -97,7 +97,7 @@ if [ "x$vmware" != "x" ] && [ "x$vmware" != "xno" ] ; then esac fi fi - + ####################################################################### # set localization if [ -z "$country" ] ; then @@ -145,13 +145,13 @@ test -n "$domain_name_servers" && { initial_boot ####################################################################### -# +# # run distro specific configuration function config_distro ####################################################################### -# +# # boot.local if [ -n "$bootlocal_script" ]; then echo -e "# entries added by $0:\n#\t$date\n\n\ @@ -164,7 +164,7 @@ fi # at daemon - calling distro specific function config_atd config_atd -# configuration of cron services - calling distro specific function +# configuration of cron services - calling distro specific function # config_cron (runlevel links, directories, ...) config_cron [ "x$crontab_entries" != "x" ] && \ @@ -384,7 +384,7 @@ if [ "x$start_x" != "xno" ] ; then echo -e "# /etc/X11/xdm/Xaccess - file generated by $0: \ $date\n*\n%hostlist\t$x_display_manager\n*\t\tCHOOSER %hostlist"\ >/mnt/etc/X11/xdm/Xaccess - + # define type of X session dsx="no" init="#7:5:respawn:/usr/X11R6/bin/X vt7 -quiet" @@ -430,7 +430,7 @@ $start_x -- vt7 -quiet' -l nobody &>/dev/null\nrm /var/run/kiosk\n\ resmgr revoke nobody\nresmgr logout tty7\nkillall X" \ >/mnt/var/X11R6/bin/kiosk # early start of kiosk session if not late_dm is set - if [ "x$late_dm" != "xyes" ] ; then + if [ "x$late_dm" != "xyes" ] ; then echo -e "\t# kiosk start added by $0\n\t\ /var/X11R6/bin/kiosk &>/dev/null &" >>/mnt/etc/${D_INITDIR}/boot.ld fi diff --git a/initrd/initrd-stuff/init b/initrd/initrd-stuff/init index d9de24f1..f36913ff 100755 --- a/initrd/initrd-stuff/init +++ b/initrd/initrd-stuff/init @@ -1,11 +1,11 @@ #!/bin/sh # Description: main script for new type of initial ramdisk for -# linux diskless clients version 4 +# linux diskless clients version 4 # # Author(s): Dirk von Suchodoletz , 15-08-2006 # # Copyright: (c) 2006 - RZ Universitaet Freiburg -# (c) 2006 - opendiskless.org project +# (c) 2006 - openslx.org project # # Version: 0.2.6e @@ -54,7 +54,7 @@ RWDIR=/dev/shm NFSRO="nfs" # run pre init script and user defined preinit.local, copied by mkdxsinitrd -# from /var/lib/opendiskless/config/... in stage2 +# from /var/lib/openslx/config/... in stage2 preinit [ -x /bin/preinit.local ] && /bin/preinit.local @@ -102,9 +102,9 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup LDAP="yes" rm /tmp/ldap-done ;; - # if (external, via tftp) configuration file retrieval should + # if (external, via tftp) configuration file retrieval should # be triggered, if no source is given try dhcp server and - # predefined standard path (~/tftpboot/client-conf/default, + # predefined standard path (~/tftpboot/client-conf/default, # client-conf//default, ...) file) FILE="yes" @@ -127,7 +127,7 @@ in $0\ncountry=\"${COUNTRY}\"" >> /etc/machine-setup # if unionfs should be used over the complete root filesystem unionfs) UNIONFS=1;; - # if cowloop should be used, only ontop of network block device and in + # if cowloop should be used, only ontop of network block device and in # combination with classical fs, like ext2 useful cowloop=*) COWLOOP=1 @@ -169,7 +169,7 @@ if [ -z "$DHCP" -a -z "$LDAP" -a -z "$IPINFO" ] ; then echo -e "# You did not specify any advanced configuration mode for your \ clients. You\n# might want to add the token 'dhcp' for DHCP configuration, \ 'file(=source)'\n# for config file get via TFTP or 'ldap(=source)' for LDAP \ -configuration to\n# your kernel command line." >> /etc/machine-setup +configuration to\n# your kernel command line." >> /etc/machine-setup if strinfile "clientip" /etc/machine-setup ; then # IP configuration seems to be present in machine-setup file . /etc/machine-setup @@ -191,7 +191,7 @@ if [ "${DEBUGLEVEL}" -gt 0 ] ; then LOGFILE="/var/log/dxs-boot.log" echo "1 4 1 7" >/proc/sys/kernel/printk [ "${DEBUGLEVEL}" -ge 2 ] && MODPRV="-v" - [ "${DEBUGLEVEL}" -gt 3 ] && { + [ "${DEBUGLEVEL}" -gt 3 ] && { set -x # and the kernel too echo "7 7 7 7" >/proc/sys/kernel/printk; } @@ -212,11 +212,11 @@ ipsetup 127.0.0.1 255.0.0.0 0.0.0.0 127.255.255.255 lo # analyze ip information from the kernel command line and put parts # of it into several variables if [ -n "$IPINFO" ] ; then - getip () { - val=$IPINFO; i=$(expr $1 - 1); - while [ $i -gt 0 ] ; do - val=${val#*:} ; i=$(expr $i - 1); - done; + getip () { + val=$IPINFO; i=$(expr $1 - 1); + while [ $i -gt 0 ] ; do + val=${val#*:} ; i=$(expr $i - 1); + done; echo $val|sed "s/:.*//"; } clientip=$(getip 1) serverip=$(getip 2) @@ -246,7 +246,7 @@ fi # ... or via tftp file get (in background) [ -n "$FILE" ] && fileget & -# if root filesystem should be imported via (d) network block device +# if root filesystem should be imported via (d) network block device if [ -n "${NBD}" ] ; then # load block device driver if needed modprobe ${MODPRV} ${NBD} || error "$init_errnbd" @@ -311,7 +311,7 @@ if [ -n "${NBD}" ] ; then ldcfg else # use normal UnionFS behaviour because rootfs is not NFS - NFSRO="" + NFSRO="" fi # finally mount the block device for i in 5 40 60 ; do @@ -344,8 +344,8 @@ hwautocfg & # try to use unionfs for rw access if available if [ -n "${UNIONFS}" -o -n "${UNION}" ] ; then - modprobe ${MODPRV} unionfs || { - error "$init_loadufs" nonfatal + modprobe ${MODPRV} unionfs || { + error "$init_loadufs" nonfatal UNIONFS=""; } fi @@ -367,7 +367,7 @@ if [ -n "${UNIONFS}" ] ; then if [ -n "${UNION}" ] ; then # for dir in "${UNION}"; do # testmkd /unionadd/$dir - # mount $dir unionadd/$dir + # mount $dir unionadd/$dir # unionctl mnt --add --after /mnt --mode ro /unionadd/$dir # most probably it is a good idea to run ldconfig, so enable it unset NOLDSC @@ -427,7 +427,7 @@ for linux diskless client specific debugging output\nLOGFILE=\"$LOGFILE\"\n#\ \n# debug level\nDEBUGLEVEL=\"$DEBUGLEVEL\"" \ > /mnt/etc/${D_SYSCONFDIR}/logfile || error "$init_errlog" -# run distribution independent and dependent configuration of files and +# run distribution independent and dependent configuration of files and # services servconfig & @@ -450,14 +450,14 @@ echo -e "rootfs / rootfs rw 0 0\ninitramdevs /dev tmpfs rw\ 0 0" > /mnt/etc/mtab [ -z "$UNIONFS" ] && echo -e "ramfs /tmp tmpfs rw 0 0\nramfs /root \ tmpfs rw 0 0\n" >> /mnt/etc/mtab - + # copy library cache if generated if [ -z "${NOLDSC}" ] ; then if waitfor /tmp/ldcfg 50000 ; then test -s /mnt/tmp/ld.so.cache && { cp /mnt/tmp/ld.so.cache /mnt/etc/ld.so.cache rm /mnt/tmp/ld.so.cache; } - else + else error "$init_errldcfg" fi else diff --git a/initrd/mkdxsinitrd b/initrd/mkdxsinitrd index 05b95b6a..7d69d91b 100755 --- a/initrd/mkdxsinitrd +++ b/initrd/mkdxsinitrd @@ -9,32 +9,32 @@ # Felix Endres # # Copyright: (c) 2003 - 2006 - RZ Universitaet Freiburg -# (c) 2006 - opendiskless.org project +# (c) 2006 - openslx.org project # # Version: 0.4.5c # debug level of script itself DEBUG=1 -# debug level of the initramfs (to trigger the addition of specific +# debug level of the initramfs (to trigger the addition of specific # binaries and kernel modules) IRFSDEBUG=1 COMETCEXCL="XF86Config*\nissue*\nmtab*\nfstab*\n" COMDIRINDXS="/tmp/scratch /var/lib/nobody" # distro specific settings read from configuration file -# D_SYSCONFDIR - system wide configuration settings in /etc - sysconfig in +# D_SYSCONFDIR - system wide configuration settings in /etc - sysconfig in # SuSE and RedHat, default in Debian and Ubuntu, conf.d in Gentoo -# D_ETCEXCL - list of files, wildcards to be excluded from /etc when using +# D_ETCEXCL - list of files, wildcards to be excluded from /etc when using # bind mounts # D_DIRINBINDMNT - lists of directories to be created in bind mounted rw # part of the client filesystem -# D_RODIRSINRW - ReadOnly Directories in RW part of filesystem to save on +# D_RODIRSINRW - ReadOnly Directories in RW part of filesystem to save on # TempFS usage -# D_DIRINDXS - directories in client filesystem which should be present +# D_DIRINDXS - directories in client filesystem which should be present # anyhow # D_BINDMNT - any code which is specific in bind mount environment # D_RCDIRS - runlevel directories relative to /etc -# D_HWMODTOIGNORE - +# D_HWMODTOIGNORE - # just ensure that variables are set and the user gets an idea if # something fails @@ -55,7 +55,7 @@ D_XFONTPATH="" D_DEFAULTCOUNTRY="" ######################################################################### -# End of global variable declaration, nothing needed to be changed at +# End of global variable declaration, nothing needed to be changed at # default below that line usage() @@ -107,10 +107,10 @@ for ELEMENT in bin sbin usr/bin usr/sbin usr/local/bin \ break fi done -return $RET +return $RET } -# copy some binary to given destination. Takes binary in $1 and +# copy some binary to given destination. Takes binary in $1 and # destination in $2 cobi() { @@ -121,7 +121,7 @@ if [ -z ${FPTB} ] ; then elif [ -L ${FPTB} ] ; then # do not copy the link but the binary the link points to local LINKDEST=`ls -la ${FPTB} | sed -e "s,.* ,,"` - case $LINKDEST in + case $LINKDEST in /*) FPTB=${ROOTDIR}${LINKDEST} ;; *) ;; @@ -135,7 +135,7 @@ fi # client root is chroot ${ROOTDIR} ldd ${FPTB#${ROOTDIR}*} >> ${INSTDIR}/tmp/libraries # possible solution: use the server binary, get library names and look -# them up manually - fixme: does ldd understand foreign architecture +# them up manually - fixme: does ldd understand foreign architecture # binaries } @@ -172,7 +172,7 @@ copy_distro_stuff() { # function files, then append to each the distro/version specific file # variables, functions set in default might that way be overwritten by # definitions in distro/version specific files - # fixme!! files should be taken from /usr/share/opendiskless/distro-specs + # fixme!! files should be taken from /usr/share/openslx/distro-specs cat distro-specs/$1/config-default >${INSTDIR}/etc/sysconfig/config cat distro-specs/$1/config-$2 >>${INSTDIR}/etc/sysconfig/config cat distro-specs/$1/functions-default >${INSTDIR}/etc/distro-functions @@ -186,28 +186,28 @@ copy_distro_stuff() { -regex ".*/\..*" -exec rm -rf {} 2>/dev/null \; } -# This function makes the directory of this script to the present working +# This function makes the directory of this script to the present working # directory # It is called within precheck() -# Does also work when called by symbolic links (even for nested links). +# Does also work when called by symbolic links (even for nested links). goto_script_dir() { [ $DEBUG -ge 2 ] && echo "Aufgerufen wurde $0, checking if it is a link" calleddetails=`ls -l $0` # get the file flags (e.g. lrwxrwxrwx) [ $DEBUG -ge 2 ] && echo $calleddetails - + calleddir=${0%/*} # Strip the filename from path [ $DEBUG -ge 2 ] && echo "Wechsele ins Verzeichnis des aufgerufenen scripts/links ($calleddir)" cd $calleddir - - while index=`expr index "$calleddetails" "l"`; + + while index=`expr index "$calleddetails" "l"`; [ $index -eq 1 ]; do [ $DEBUG -ge 2 ] && echo "It is a link" target=`echo $calleddetails | awk '{print $NF}'` [ $DEBUG -ge 2 ] && echo "The target of the link is: $target" hasslash=`expr index "$target" "/"` - if [ $hasslash -ne 0 ]; then + if [ $hasslash -ne 0 ]; then targetpath=${target%/*} # extract the pathname [ $DEBUG -ge 2 ] && echo "Following link to $targetpath" cd $targetpath @@ -273,7 +273,7 @@ done while getopts :bhgk:i:r:o:s:f:n:Sut:d:v:I:V:a: a ; do case $a in - \:|\?) + \:|\?) case $OPTARG in k) echo "-k requires kernel version parameter";; i) echo "-i requires initrd path parameter";; @@ -304,10 +304,10 @@ while getopts :bhgk:i:r:o:s:f:n:Sut:d:v:I:V:a: a ; do d) IRFSDEBUG=$OPTARG;; D) DISTRO=$OPTARG;; v) DISTRO_VER=$OPTARG;; - I) NET_IF=$OPTARG;; # Not in use + I) NET_IF=$OPTARG;; # Not in use a) acpi_dsdt="$OPTARG";; # Not in use S) use_selinux=1;; # Not in use - l) local_init_script="$OPTARG";; # use for pre/postinit.local? + l) local_init_script="$OPTARG";; # use for pre/postinit.local? u) sysfs_root=1 # Not in use use_udev= ;; @@ -342,7 +342,7 @@ if [ -z "${DISTRO}" ] ; then DISTRO=suse DISTRO_VER=`grep "VERSION" ${ROOTDIR}/etc/SuSE-release | sed "s/.*= //"` elif [ -e ${ROOTDIR}/etc/lsb-release ] ; then - . ${ROOTDIR}/etc/lsb-release + . ${ROOTDIR}/etc/lsb-release DISTRO=${DISTRIB_ID} DISTRO_VER=${DISTRIB_RELEASE} elif [ -e ${ROOTDIR}/etc/debian_version ] ; then @@ -361,7 +361,7 @@ if [ -z "${DISTRO}" ] ; then echo -e "Could not detect client distribution type and version. Please \ specify\nas command line argument (-d -v )" exit 1; - fi + fi fi # unify the description of distribution and its version @@ -394,7 +394,7 @@ case "${DISTRO}" in 2005*|*) DISTRO_VER=2005.1 ;; - esac + esac ;; SuSE*|suse*|Suse*|SuSe*|SUSE*|*) DISTRO=suse @@ -419,7 +419,7 @@ copy_distro_stuff ${DISTRO} ${DISTRO_VER} cp -a ${ROOTDIR}/etc/udev ${INSTDIR}/etc # binary and corresponding library copies could be avoided if a small -# initial ramdisk environment of its own is generated from busybox, +# initial ramdisk environment of its own is generated from busybox, # dietlibc and similar, see odlx project page ... # devices needed rather early (copied from /tmp to /dev in init) @@ -453,7 +453,7 @@ if [ -n "$use_busybox" ] ; then else # find and copy a shell to be used within initialramfs for bbins in bash ash sh; do - if cobi ${bbins} bin ; then + if cobi ${bbins} bin ; then ln -fs ${bbins} ${INSTDIR}/bin/sh [ "${bbins}" != "ash" ] && ln -fs ${bbins} ${INSTDIR}/bin/ash [ "${bbins}" != "bash" ] && ln -fs ${bbins} ${INSTDIR}/bin/bash @@ -463,7 +463,7 @@ else # find and copy ip setup binaries for bbins in ip ifconfig; do - if cobi ${bbins} bin ; then + if cobi ${bbins} bin ; then [ "${bbins}" = "ifconfig" ] && cobi route bin break else echo "Binary not found"; fi @@ -494,7 +494,7 @@ else cobi $tftp bin || echo "Program ${tftp} not found" cp /lib/libnss_files.so.2 ${INSTDIR}/lib fi - + # one of the dhcp clients for dhcp in dhclient dhcpcd pump ipconfig ; do binfinder $dhcp && break; @@ -520,7 +520,7 @@ for i in ${FSMODULES}; do dnbd) cobi dnbd-client bin ;; - nbd) + nbd) cobi nbd-client bin ;; esac @@ -537,7 +537,7 @@ cobi cowdev bin &>/dev/null || \ # distro specific additional stuff -case "${DISTRO}" in +case "${DISTRO}" in debian*) cp ${ROOTDIR}/lib/libnss_compat.so.2 ${INSTDIR}/lib;; esac @@ -636,7 +636,7 @@ cp ${ROOTDIR}/lib/modules/${KERNVER}/modules.* \ # initial ramdisk scripts: init, functions, servconfig, hwautocfg, ... # copy and replace variable names for dirs in `find initrd-stuff/* ! -regex ".*/\..*"` ; do - repco ${dirs##initrd-stuff/} + repco ${dirs##initrd-stuff/} done chmod 755 ${INSTDIR}/init \ ${INSTDIR}/bin/{servconfig,hwautocfg,screenres,dhcpmkconfig} @@ -644,12 +644,12 @@ chmod 755 ${INSTDIR}/init \ # add the common default client configuration file - just to ensure to # have all major variables defined. !!These settings are most probably # are overwritten by fileget in stage3 within initramfs!! -if [ -f /var/lib/opendiskless/config/default/initramfs/machine-setup ] ; then - cp /var/lib/opendiskless/config/default/initramfs/machine-setup \ +if [ -f /var/lib/openslx/config/default/initramfs/machine-setup ] ; then + cp /var/lib/openslx/config/default/initramfs/machine-setup \ ${INSTDIR}/etc/machine-setup # use the installed default machine-setup.default -elif [ -f /usr/share/opendiskless/templates/machine-setup.default ] ; then - cp /usr/share/opendiskless/templates/machine-setup.default \ +elif [ -f /usr/share/openslx/templates/machine-setup.default ] ; then + cp /usr/share/openslx/templates/machine-setup.default \ ${INSTDIR}/etc/machine-setup # just compatibility for older versions elif [ -f /etc/dxs/client.cfg/machine-setup.default ] ; then @@ -671,12 +671,12 @@ fi # custom hardware configuration files pcitable.local and Cards.local # fixme!! New source for these files (instead of templates)! -if [ -f /usr/share/opendiskless/templates/pcitable.local ] ; then - cat /usr/share/opendiskless/templates/pcitable.local >> \ +if [ -f /usr/share/openslx/templates/pcitable.local ] ; then + cat /usr/share/openslx/templates/pcitable.local >> \ ${INSTDIR}/usr/share/hwdata/pcitable fi -if [ -f /usr/share/opendiskless/templates/Cards.local ] ; then - cat /usr/share/opendiskless/templates/Cards.local >> \ +if [ -f /usr/share/openslx/templates/Cards.local ] ; then + cat /usr/share/openslx/templates/Cards.local >> \ ${INSTDIR}/usr/share/hwdata/Cards fi @@ -687,8 +687,8 @@ for cfg in default/initramfs/preinit.local \ ${DISTRO}-${DISTRO_VER}/initramfs/preinit.local \ default/initramfs/postinit.local \ ${DISTRO}-${DISTRO_VER}/initramfs/postinit.local ; do - test -f /var/lib/opendiskless/config/$cfg && \ - cp /var/lib/opendiskless/config/$cfg ${INSTDIR}/bin + test -f /var/lib/openslx/config/$cfg && \ + cp /var/lib/openslx/config/$cfg ${INSTDIR}/bin done # remove unneeded debug info, fixme not really tested yet diff --git a/installer/ld4-inst b/installer/ld4-inst index 23e501ba..19a29af0 100755 --- a/installer/ld4-inst +++ b/installer/ld4-inst @@ -26,20 +26,20 @@ goto_script_dir() [ $DEBUG -ge 2 ] && echo "Aufgerufen wurde $0, checking if it is a link" calleddetails=`ls -l $0` # get the file flags (e.g. lrwxrwxrwx) [ $DEBUG -ge 2 ] && echo $calleddetails - + calleddir=${0%/*} # Strip the filename from path [ $DEBUG -ge 2 ] && echo "Changing into directory of called scripts/links \ ($calleddir)" cd $calleddir - - while index=`expr index "$calleddetails" "l"`; + + while index=`expr index "$calleddetails" "l"`; [ $index -eq 1 ]; do [ $DEBUG -ge 2 ] && echo "It is a link" target=`echo $calleddetails | awk '{print $NF}'` [ $DEBUG -ge 2 ] && echo "The target of the link is: $target" hasslash=`expr index "$target" "/"` - if [ $hasslash -ne 0 ]; then + if [ $hasslash -ne 0 ]; then targetpath=${target%/*} # extract the pathname [ $DEBUG -ge 2 ] && echo "Following link to $targetpath" cd $targetpath @@ -63,10 +63,10 @@ precheck() { echo -e "\nYou don't have the needed permission. Please rerun as root user!\n" exit 1 fi - + # switch pwd to this scripts location goto_script_dir - + # check for existing programs: # rsync (server-side) which rsync >/dev/null @@ -77,7 +77,7 @@ precheck() { # ssh, rsync (referenz-system-side) -> not possible in precheck - # nfs-kernel-server, atftpd + # nfs-kernel-server, atftpd # -> not needed for installation # but should be checked here, so the admin has just to restart } @@ -180,7 +180,7 @@ configure() { # fi fi . .config - + [ -z $overwrite_configs ] && overwrite_configs="y" ask "Overwrite server configs (y) or write *.new files (n)? " overwrite_configs $overwrite_configs if [ "$overwrite_configs" = "no" -o "$overwrite_configs" = "n" -o \ @@ -254,7 +254,7 @@ configure() { ask "Which debug level should be used? " debuglevel $debuglevel [ -z "$debuglevel" ] && debuglevel=0 done - + # wo ist das referenzsystem? - was ist default ??? if [ -z ${rsyncsource} ] ; then rsyncsource="localhost:/" ; fi ask "IP + Path to reference system: " rsyncsource $rsyncsource @@ -285,7 +285,7 @@ copy_system() { else local file="distro-specs/exclude-${client_distro}" fi - # put specific an common exclude list into one file, add includes (+) + # put specific an common exclude list into one file, add includes (+) # before excludes (-) cat $file distro-specs/exclude-common|grep -e "^+ " > /tmp/dxs-exclude-list cat $file distro-specs/exclude-common|grep -e "^- " >> /tmp/dxs-exclude-list @@ -306,7 +306,7 @@ create_nbd() { if [ "$nbdfs" = "squashfs" ] ; then if ps aux|grep -v grep|grep mksquashfs &>/dev/null ; then echo "Found other mksquashfs process running, skipping this step." - else + else echo -e "\nGenerating SquashFS image ${rootdir}.squashfs (ca. 30 min.)" if `which mksquashfs &>/dev/null` ; then mv ${rootdir}.squashfs ${rootdir}.squashfs.old @@ -356,14 +356,14 @@ kernel_choice "${kernel_choice}" choice=( ${kernel_choice} ) # make sure /$tftbootdir exists mkdir -p ${tftpbootdir} - + declare -i j=0 # add nfs modules nevertheless fsmod=nfs # add nbd module and the selected filesystem ontop isyes "$nbdyes" && fsmod=$fsmod" nbd $nbdfs" # one big initrd or several smaller "specialized" ones!? - + # FIXME: mkdxsinitrd currently wants to run from own directory # ugly workaround... cd ../initrd @@ -379,7 +379,7 @@ kernel_choice "${kernel_choice}" ln -sf ${kernel[${choice[$j]}]} ${tftpbootdir}/vmlinuz-${current_kernel} j=$j+1 done - cd - + cd - } # setting up server site configuration files etc. @@ -393,12 +393,12 @@ setup_server () { [ -d ${dxs_conf}/${dir} ] || mkdir -p ${dxs_conf}/${dir} done - # copy the client configuration default file and replace root_pw - + # 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_cl_dir}/${dxs_client_conf} - # creating new configuration files in $dxs_conf + # creating new configuration files in $dxs_conf # dhcp sed -e "s,@@@server@@@,${server},g;s,@@@tftpbootdir@@@,${tftpbootdir},g" \ -e "s,@@@netmask@@@,${netmask},g;s,@@@broadcast@@@,${broadcast},g" \ @@ -420,7 +420,7 @@ ${rootdir} ${netname}/${netmask}(ro,no_root_squash,async)" \ >> ${dxs_conf}/${dxs_exports_conf}-${timestamp} # pxe - [ -d ${tftpbootdir} ] || mkdir -p ${tftpbootdir} + [ -d ${tftpbootdir} ] || mkdir -p ${tftpbootdir} rsync -a --exclude=.svn default_files/tftpboot/* ${tftpbootdir} sed -e "s,@@@server@@@,${server},g;s,@@@tftpbootdir@@@,${tftpbootdir},g" \ @@ -440,7 +440,7 @@ ${rootdir} ${netname}/${netmask}(ro,no_root_squash,async)" \ else default_string="" fi - # because of restricted length of kernel commandline put the initrd token + # because of restricted length of kernel commandline put the initrd token # last (needed only for loading with pxelinux) echo -e "LABEL ${client_distro}-${current_kernel}\n${default_string}\ MENU LABEL $j. ${client_distro}-${client_distro_ver} ${current_kernel} Diskless\n\ @@ -462,10 +462,10 @@ ${rootdir} ${netname}/${netmask}(ro,no_root_squash,async)" \ j=$j+1 done - + # if files should not be overwritten keep them # in place and create files with ".new" extension - if [ "$overwrite_configs" = "no" ] ; then + if [ "$overwrite_configs" = "no" ] ; then extension=".new" keep="yes" fi @@ -485,16 +485,16 @@ ${rootdir} ${netname}/${netmask}(ro,no_root_squash,async)" \ else # backing up orginial files / create files with .new extension if [ -f ${2} -a ! -L ${2} ] ; then - if [ -z "$keep" ] ; then + if [ -z "$keep" ] ; then echo "Copying old ${2} to ${2}.original" mv ${2} ${2}.original else echo "Keeping old ${2} and generate ${2}.new instead" fi - elif [ -L ${2} ] ; then + elif [ -L ${2} ] ; then [ -z "$keep" ] && unlink ${2} fi - # linking files + # linking files # fixme!! if SuSE und DHCP dann Kopie statt Link if [ ${server_distro} = "suse" ] && echo ${dxs_conf}|\ grep dhcp &>/dev/null; then @@ -533,7 +533,7 @@ dxs_atftpd_conf="atftpd/atftpd" dxs_exports_conf="nfs/exports" dxs_pxedefault_conf="pxelinux/default" # config directory for the client side -dxs_cl_dir="/var/lib/opendiskless/config/default/initramfs" +dxs_cl_dir="/var/lib/openslx/config/default/initramfs" dxs_client_conf="machine-setup" diff --git a/tools/tar_exclude_from b/tools/tar_exclude_from index ba209df1..01c3b3de 100644 --- a/tools/tar_exclude_from +++ b/tools/tar_exclude_from @@ -1,3 +1,3 @@ .svn .*.swp -opendiskless*.tar.bz2 +openslx*.tar.bz2 -- cgit v1.2.3-55-g7522