summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--apache-default36
-rw-r--r--droppbs.sql23
-rw-r--r--header.txt10
-rwxr-xr-xinit_ubuntu1036
-rw-r--r--kcl_ip_config1
-rw-r--r--notes-1.txt386
-rw-r--r--notes-2.txt76
-rw-r--r--scripts/api_test.html (renamed from api_test.html)0
-rw-r--r--scripts/dbContent.php (renamed from dbContent.php)0
-rw-r--r--scripts/dbContent.png (renamed from dbContent.png)bin192702 -> 192702 bytes
-rw-r--r--scripts/fbgui-test.html (renamed from send-post.html)0
-rwxr-xr-xscripts/local-install.sh (renamed from zend-su.sh)0
-rw-r--r--scripts/mysqlGraph.php (renamed from mysqlGraph.php)0
-rw-r--r--scripts/mysqlGraph.png (renamed from mysqlGraph.png)bin280861 -> 280861 bytes
-rw-r--r--setup/pbs-newdata.sql (renamed from pbs-newdata.sql)0
-rw-r--r--setup/pbs.sql (renamed from pbs.sql)0
-rw-r--r--template.php37
-rw-r--r--ubuntu-initbin6020724 -> 0 bytes
-rw-r--r--zend-user.sh4
19 files changed, 0 insertions, 1609 deletions
diff --git a/apache-default b/apache-default
deleted file mode 100644
index 95d0580..0000000
--- a/apache-default
+++ /dev/null
@@ -1,36 +0,0 @@
-<VirtualHost *:80>
- ServerAdmin webmaster@localhost
-
-DocumentRoot /tmp/pbs2/public
- <Directory /tmp/pbs2/public >
- Options FollowSymLinks
- AllowOverride All
- </Directory>
-
-
- ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/
- <Directory "/usr/lib/cgi-bin">
- AllowOverride None
- Options +ExecCGI -MultiViews +SymLinksIfOwnerMatch
- Order allow,deny
- Allow from all
- </Directory>
-
- ErrorLog /var/log/apache2/error.log
-
- # Possible values include: debug, info, notice, warn, error, crit,
- # alert, emerg.
- LogLevel warn
-
- CustomLog /var/log/apache2/access.log combined
-
- Alias /doc/ "/usr/share/doc/"
- <Directory "/usr/share/doc/">
- Options Indexes MultiViews FollowSymLinks
- AllowOverride None
- Order deny,allow
- Deny from all
- Allow from 127.0.0.0/255.0.0.0 ::1/128
- </Directory>
-
-</VirtualHost>
diff --git a/droppbs.sql b/droppbs.sql
deleted file mode 100644
index 3412fd2..0000000
--- a/droppbs.sql
+++ /dev/null
@@ -1,23 +0,0 @@
-USE pbs;
-DROP TABLE pbs_bootiso;
-DROP TABLE pbs_bootmenuentries;
-DROP TABLE pbs_filterentries;
-DROP TABLE pbs_groupgroups;
-DROP TABLE pbs_grouprequest;
-DROP TABLE pbs_membershipfilters;
-DROP TABLE pbs_poolentries;
-DROP TABLE pbs_poolfilters;
-DROP TABLE pbs_rightroles;
-DROP TABLE pbs_session;
-DROP TABLE pbs_client;
-DROP TABLE pbs_filtertype;
-DROP TABLE pbs_filter;
-DROP TABLE pbs_role;
-DROP TABLE pbs_right;
-DROP TABLE pbs_pool;
-DROP TABLE pbs_person;
-DROP TABLE pbs_bootos;
-DROP TABLE pbs_bootmenu;
-DROP TABLE pbs_config;
-DROP TABLE pbs_group;
-DROP TABLE pbs_membership;
diff --git a/header.txt b/header.txt
deleted file mode 100644
index 054597a..0000000
--- a/header.txt
+++ /dev/null
@@ -1,10 +0,0 @@
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
- * This program is free software distributed under the GPL version 2.
- * See http://gpl.openslx.org/
- *
- * If you have any feedback please consult http://feedback.openslx.org/ and
- * send your suggestions, praise, or complaints to feedback@openslx.org
- *
- * General information about OpenSLX can be found at http://openslx.org/
- */
diff --git a/init_ubuntu b/init_ubuntu
deleted file mode 100755
index 82012d6..0000000
--- a/init_ubuntu
+++ /dev/null
@@ -1,1036 +0,0 @@
-#!/bin/sh
-# Copyright (c) 2003..2006 - RZ Uni Freiburg
-# Copyright (c) 2006..2010 - OpenSLX GmbH
-#
-# This program is free software distributed under the GPL version 2.
-# See http://openslx.org/COPYING
-#
-# If you have any feedback please consult http://openslx.org/feedback and
-# send your feedback to feedback@openslx.org
-#
-# General information about OpenSLX can be found at http://openslx.org
-#
-# Main script for initial ramfs for OpenSLX linux stateless clients
-#############################################################################
-
-# fixme: the primary init script should never fail, so move all critical code
-# into sub script calls (see ticket 259)
-
-export PATH=/bin:/sbin:/usr/bin/:/usr/sbin
-
-# device files get their own filesystem (to be move mounted later)
-devdir="/dev"
-mount -n -t tmpfs -o 'size=25%,mode=0755' initramfsdevs ${devdir}
-
-# mount the important standard directories
-[ ! -f /proc/cpuinfo ] && mount -n -t proc proc /proc
-[ ! -d /sys/class ] && mount -n -t sysfs sysfs /sys
-
-# create basic device files an directories (in dev - for most hardware related
-# devices mdev should handle that)
-for i in "/dev/mem c 1 1" "/dev/null c 1 3" "/dev/zero c 1 5" \
- "/dev/urandom c 1 9" "/dev/kmsg c 1 11" "/dev/tty0 c 4 0" \
- "/dev/tty1 c 4 1" "/dev/tty2 c 4 2" "/dev/tty3 c 4 3" \
- "/dev/tty4 c 4 4" "/dev/tty5 c 4 5" "/dev/tty6 c 4 6" \
- "/dev/tty7 c 4 7" "/dev/tty8 c 4 8" "/dev/tty9 c 4 9" \
- "/dev/tty10 c 4 10" "/dev/tty c 5 0" "/dev/console c 5 1" \
- "/dev/ptmx c 5 2" "/dev/psaux c 10 1" "/dev/agpgart c 10 175" \
- "/dev/fb0 c 29 0" "/dev/xconsole p"; do
- mknod $i
-done
-mkdir -p ${devdir}/pts ${devdir}/shm ${devdir}/.udevdb ${devdir}/.udev \
- ${devdir}/.initramfs /var/log
-# create some standard links (expected?) in /dev
-ln -s /proc/kcore /dev/core
-ln -s /proc/self/fd /dev/fd
-ln -s /proc/self/fd/0 /dev/stdin
-ln -s /proc/self/fd/1 /dev/stdout
-ln -s /proc/self/fd/2 /dev/stderr
-
-# redirect kernel messages to tty10 instead of the standard console
-getty -i -n -l /bin/cat 38400 tty10 &
-setlogcons 10
-
-# start device auto discovery/setup service of busybox
-echo >/etc/mdev.conf
-mdev -s
-
-# source functions file common for all distros, messages contains all error
-# and info output (for some reason the error output is not produced properly
-# - crash)
-
-# how do the localization here? There is not yet a country-Variable
-. /etc/messages
-. /etc/functions || ( echo -e $init_mff && sleep 100 )
-. /etc/distro-functions || ( echo -e $init_dff && sleep 100 )
-
-# configuration settings for this slx system's environment
-. /etc/slxsystem.conf 2>/dev/null || ( echo -e ${init_sscf} && \
- sleep 100 )
-# initramfs-setup configuration (common initial settings for all clients using
-# a certain InitRamFS generated by slxconfig-demuxer)
-[ -f /etc/initramfs-setup ] && . /etc/initramfs-setup 2>/dev/null
-
-export date="${slxconf_date}"
-
-export DEBUGLEVEL=0
-export KERNEL="${slxconf_kernver}"
-export NWMODULES="${slxconf_listnwmod}"
-export DISTRO_NAME="${slxconf_distro_name}"
-export DISTRO_VER="${slxconf_distro_ver}"
-export SYSTEM_NAME="${slxconf_system_name}"
-export SLXVERSION="${slxconf_slxver}"
-
-# do not use dnbd cache file
-nodnbdcache="yes"
-
-# set a default LAN interface, might be modified for WLAN, bridge setups or
-# on machines with more than one ethernet card built in
-export nwif="eth0"
-
-# load usb modules for keyboard (reenable usb keyboards, otherwise the
-# admin has to wait until second run of hwsetup late in stage3) and the
-# network adaptor modules, search for pci modules to load later on
-hwautocfg base
-
-# if no kernel version is set, try to get it directly from /proc
-if [ -z $KERNEL ] ; then
- KERNEL=$(cat /proc/version)
- KERNEL=${KERNEL#*version }
- KERNEL=${KERNEL% (*) (*}
-fi
-
-# set defaults for some important variables, might be overwritten via
-# kernel commandline
-tmpfssize="$(expr $(grep -i "memtotal" /proc/meminfo | awk '{print $2}') \
- / 100 \* 75 - 128000)k" # in kbyte
-cowsize="50%"
-rwdir=/dev/shm
-nfsro="nfs"
-aufs=1
-unionfs=1
-
-runinithook '00-started'
-
-# run pre init script and user defined preinit.local, copied by mkdxsinitrd
-# from /var/lib/openslx/config/... in stage2
-preinit
-[ -x /bin/preinit.local ] && /bin/preinit.local
-
-
-# switch off the several configuration methods, will be switched on
-# according to kernel commandline settings
-echo "noldap" > /tmp/ldap-done
-
-# external configuration file retrieval (per tftp) must be done, as otherwise
-# we will never get the initramfs-setup file. By default, we try a predefined
-# standard path (.../tftpboot/client-config/ ...)
-file="no"
-
-# read kernel commandline
-read KCMDLINE < /proc/cmdline
-export KCMDLINE
-# read the system wide initramfs-setup and then the kernel commandline
-for opts in $(sed "s/#.*//" /etc/initramfs-setup) ${KCMDLINE} ; do
- case ${opts} in
- # shut down pc
- shutdown)
- cat <<EOL
-
- SHUTTING DOWN PC!
-
-EOL
- echo "o" >/proc/sysrq-trigger
- ;;
- # from IPAPPEND
- BOOTIF=*)
- bootmac=$(echo ${opts} | sed "s/.*=01-//;s/-/:/g")
- ;;
- # localization
- country=*)
- COUNTRY=${opts#country=}
- grep -q -E "country=" /etc/initramfs-setup &&
- echo -e "\n# localization information gotten via kernel command line \
-in $0\ncountry=\"${COUNTRY}\"" >>/etc/initramfs-setup
- ;;
- # single token for debugging ...
- debug)
- DEBUGLEVEL=1
- ;;
- # ... or a specified debug level
- debug=*)
- DEBUGLEVEL=${opts#debug=}
- if [ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] ; then
- echo "** SLX init started near $(sysup)"
- elif [ $DEBUGLEVEL -ge 3 -a $DEBUGLEVEL -le 20 ] ; then
- # create, start a debug shell process
- echo "Debug shell started on second console (tty2)"
- echo -e "#!/bin/sh\nsh" >/bin/debugshell
- chmod u+x /bin/debugshell
- getty -i -n -l /bin/debugshell 38400 tty2 &
- # start logging (debuglevel >=3)
- # fixme: SuSE hangs in Creating /var/log/boot.msg if activated
- echo "Syslogd started on third console (tty3)"
- # just to have some name in syslog
- echo "(slx init)" >/proc/sys/kernel/hostname
- syslogd -C2048
- klogd
- logread -f > /dev/tty3 2>/dev/null &
- logread -f >> /var/log/messages 2>/dev/null &
- fi
- ;;
- # if configuration should not be gathered by dhcp client
- nodhcp)
- nodhcp="yes"
- echo "nodhcp" >/tmp/dhcp-done
- ;;
- nofile)
- unset file
- echo "nofile" >/tmp/file-done
- ;;
- # if ldap configuration should be triggered
- ldap)
- ldap="yes"
- rm /tmp/ldap-done
- ;;
- # ldap configuration with host and port to contact (base)
- ldap=*)
- ldap="yes"
- rm /tmp/ldap-done
- ;;
- # file source with tftp server and file location on the server
- file=*|file)
- if [ "${opts}" != "file" ] ; then
- fileprot=$(uri_token ${opts#file=} prot)
- fileserv=$(uri_token ${opts#file=} server)
- filepath=$(uri_token ${opts#file=} path)
- fi
- ;;
- # if ld.so.cache should be generated; should be switched on when composing
- # rootfs from more than one source
- ldsc)
- ldsc="yes";;
- # simple union of base ro rootdir with tempfs on top
- nounionfs)
- unionfs=0;;
- # additional source to unify root filesystem with; the top layer will be
- # the tempfs
- unionfs=*)
- unionfs=1
- uniondirs=${opts#unionfs=}
- # most probably it is a good idea to run ldconfig, so enable it
- ldsc="yes"
- ;;
- noldsc)
- ldsc="";;
- # same for AUFS; alternative to unionfs
- noaufs)
- aufs=0;;
- aufs=*)
- aufs=1
- uniondirs=${opts#aufs=}
- # most probably it is a good idea to run ldconfig, so enable it
- ldsc="yes"
- ;;
- noldsc)
- ldsc="";;
- # if cowloop should be used, only ontop of network block device and in
- # combination with classical fs, like ext2 useful
- cowloop=*)
- cowloop=1
- #cowsize=${opts#cowloop=}
- ;;
- # rootfs will void the variables (d)nbdroot, nfsroot ...
- # fixme: allow multiple rootfs sources to be unioned!?
- # if strinstr " " "$rootfs" ...
- rootfs=*)
- rootfs=${opts#rootfs=}
- rootfs=${rootfs#\"}
- rootfs=${rootfs%%\"}
- srvproto=$(uri_token $rootfs prot)
- case $srvproto in
- nfs)
- # nfsroot consists of two components
- nfspath=$(uri_token $rootfs path)
- nfsserver=$(uri_token $rootfs server)
- grep -q -E "nfsserver" /etc/initramfs-setup || \
- echo -e "# nfs root information gotten via kernel command \
-line in $0\nnfsserver=\"${nfsserver}\"\nnfspath=\"${nfspath}\"" \
- >>/etc/initramfs-setup
- ;;
- *nbd*)
- bldmod=$srvproto
- # get settings for nbd-client, filesystem equals to path in URI
- # notation (remove leading slash from filesystem at the end)
- bldhost=$(uri_token $rootfs server)
- bldport=$(uri_token $rootfs port)
- bldrfst=$(uri_token $rootfs path)
- bldrfst=${bldrfst#/*}
- ;;
- aoe)
- echo "Not implemented yet"
- bldmod=
- ;;
- iscsi)
- echo "Not implemented yet"
- bldmod=
- #iscsiserver=$(uri_token $rootfs server)
- #iscsiport=$(uri_token $rootfs port)
- #iscsitarget=$(uri_token $rootfs path)
- ;;
- lbd)
- # use a local device for mounting root block device with given
- # filesystem directly or a root filesystem container from another
- # filesystem, e.g. rootfs=lbd://sda1/squashfs (bldmod cannot be
- # empty, use loop or the real device stuff)
- bldmod=loop
- blddev=$(uri_token $rootfs server)
- bldfst=$(uri_token $rootfs path)
- bldfst=${bldfst#/*}
- ;;
- esac
- ;;
- # size of cache dnbd should use within ram
- dcsize=*)
- dnbdcachesize=${opts#dcsize=};;
- # ip configuration client-ip:server-ip:gateway:netmask
- ip=*)
- ipinfo=${opts#ip=};;
- # deprecated: nfs server and path (rewritten to standard style)
- nfsroot=*)
- srvproto=nfs
- nfsroot=${opts#nfsroot=}
- nfspath=${nfsroot#*:}
- nfsserver=${nfsroot%:/*}
- grep -q -E "nfsserver" /etc/initramfs-setup || \
- echo -e "\n# nfs root information gotten via kernel command line \n\
-in $0\n# deprecated: please use rootfs=nfs://...\nnfsserver=\"${nfsserver}\"\
-\nnfspath=\"${nfspath}\"">> /etc/initramfs-setup
- ;;
- # size of tempfs if not max. 50% of RAM should be used
- tmpfssize=*)
- tmpfssize=${opts#tmpfssize=};;
- # vendor code identifier for dhcp requests, that way OpenSLX clients could
- # be distinguished from other (dhcp) clients
- vci=*)
- vci=${opts#vci=};;
- # option for ddcinfo
- ddcinfo=*)
- ddcinfo=${opts#ddcinfo=};;
- esac
-done
-
-runinithook '05-have-kernelvars'
-
-# at this point a timer should be started to ensure an automated reboot
-# or halt of the machine if SLX init does not succeed (e.g. missing kernel
-# module for the network adaptor)
-if [ ${DEBUGLEVEL} -lt 3 -o ${DEBUGLEVEL} = 8 ] ; then
- cat<<EOF > /bin/watchdog
-#!/bin/sh
-echo \$$ > /tmp/watchdogpid
-[ ! -f /proc/version ] && mount -n -t proc proc /proc
-sleep 120 2> /dev/null
-echo "o" > /proc/sysrq-trigger
-EOF
- chmod u+x /bin/watchdog
- watchdog &
-fi
-
-# check if at least one type of IP configuration is availabe
-if [ -n "$nodhcp" -a -z "$ldap" -a -z "$ipinfo" -a $srvproto != "lbd" ]
- 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 config, \
-'file(=source)'\n# for config file get via TFTP or 'ldap(=source)' for LDAP \
-configuration to\n# your kernel command line." >> /etc/initramfs-setup
- if strinfile "clientip" /etc/initramfs-setup ; then
- # IP configuration seems to be present in initramfs-setup file
- # TODO: FIX this, as it will clobber all kernel-cmdline values!
- . /etc/initramfs-setup
- ipinfo="ip=$clientip:$serverip:$gateway:$subnet_mask"
- else
- error "$init_errip"
- fi
-fi
-
-# for ldap configuration at least basic IP setup is needed to contact the
-# server
-[ -n "$nodhcp" -a -n "$ldap" -a -z "$ipinfo" ] && error "$init_errldap"
-# set debug level and logfile
-if [ $DEBUGLEVEL -eq 20 ] ; then
- echo "** Setting debuglevel to ${DEBUGLEVEL} at $(sysup)"
-elif [ $DEBUGLEVEL -ne 0 ] ; then
- echo "Setting debuglevel to ${DEBUGLEVEL}"
-fi
-export MODPRV=" "
-export LOGFILE
-if [ "${DEBUGLEVEL}" -gt 0 -a "${DEBUGLEVEL}" != 8 ] ; then
- # set LOGFILE and move it later on into stage4
- LOGFILE="/var/log/slx-boot.log"
- echo "Starting OpenSLX client boot logging at $(date)" >$LOGFILE
- echo "1 4 1 7" >/proc/sys/kernel/printk
- [ "${DEBUGLEVEL}" -ge 2 ] && MODPRV="-v"
- [ "${DEBUGLEVEL}" -gt 3 -a "${DEBUGLEVEL}" -le 10 ] && {
- set -x
- # and the kernel too
- echo "7 7 7 7" >/proc/sys/kernel/printk; }
- [ "${DEBUGLEVEL}" -gt 10 -a "${DEBUGLEVEL}" -le 20 ] && set +x
-else
- # switch off most of kernel debug output
- echo "0 0 0 0" >/proc/sys/kernel/printk
- # modprobe should stay quiet
- MODPRV="-q"
- LOGFILE="/dev/null"
-fi
-
-runinithook '10-nw-if-config'
-
-# check for multiple ethernet interfaces (we have at least the mac of PXE boot
-# device in $bootmac)
-# check here for the active ethernet link (skip non-ethN interfaces)
-if strinstr "eth" "$nwif" ; then
- for ethif in eth0 eth1 eth2 eth3 ; do
- export macaddr=$(ip link show dev $ethif 2>/dev/null | \
- grep -i link.ether | awk '{print $2}')
- # if there is no bootmac present in kernel commandline any checks are
- # useless
- if [ -z "$bootmac" ] ; then
- bootmac="$macaddr"
- [ "$ethif" != "eth0" ] && error "$init_bootmac" nonfatal
- fi
- if [ "$macaddr" = "$bootmac" ] ; then
- nwif=$ethif
- break
- elif [ "x$macaddr" = "x" ] ; then
- # if the macaddr is empty on the first interface tried, there is no
- # network adaptor visible (missing kernel module)
- if [ "$ethif" = "eth0" ] ; then
- error "$init_errnwad"
- else
- # assume a forcedeth problem here (nonmatching MACs)
- macaddr=${bootmac}
- fi
- break
- fi
- done
-fi
-# quickfix for proper nwif passing ... (to be fixed in a more general way)
-sed "s/nwif=.*/nwif=\"${nwif}\"/" -i /tmp/env/wrapper.env
-oldnwif=$nwif
-# hook to setup bridging (several virtualization tools ...
-runinithook '20-nw-bridge-config'
-
-# set up loopback networking
-[ $DEBUGLEVEL -eq 20 ] && echo "** starting ip config at $(sysup)"
-ip link set dev lo up 2>/dev/null
-ip addr add 127.0.0.1/8 dev lo 2>/dev/null
-ip link set dev $nwif up 2>/dev/null || error "$init_noeth"
-
-# analyze ip information from the kernel command line and put parts
-# of it into several variables
-if [ -n "$ipinfo" ] ; then
- getip () {
- local val="$ipinfo:"; i=$(($1 - 1));
- while [ $i -gt 0 ] ; do
- val=${val#*:} ; i=$(($i - 1));
- done;
- echo $val|sed "s/:.*//"; }
- clientip=$(getip 1)
- serverip=$(getip 2)
- gateway=$(getip 3)
- subnet_mask=$(getip 4)
- broadcast_address=$(ipcalc -s -b $clientip $subnet_mask|sed s/.*=//)
- [ -z "$broadcast_address" ] && broadcast_address=255.255.255.255
- # we might have an idea of the dns server via preboot
- dns_srv=$(getip 5)
- [ -n "$dns_srv" ] && echo nameserver $dns_srv >/etc/resolv.conf;
- echo -e "# ip configuration written by $0 script:\nclientip=$clientip\n\
-subnet_mask=$subnet_mask\ngateway=$gateway\nserverip=$serverip\n\
-broadcast_address=$broadcast_address" >>/etc/initramfs-setup
- # set static ip address
- ip addr add $clientip/$(ipcalc -s -p $clientip $subnet_mask|sed s/.*=//) \
- broadcast $broadcast_address dev $nwif 2>/dev/null
- ip route add default via $gateway 2>/dev/null
-else
- noipyet="yes"
-fi
-# get configuration data via dhcp (with vendor code identifier if present
-# in ${vci} from kernel command line or initramfs-setup) ...
-if [ -z "$nodhcp" ] ; then
- ( rundhcp ${vci}; echo "dhcp finished at $(sysup)" >/tmp/dhcp-done ) &
- if [ -n "$noipyet" ] ; then
- waitfor /tmp/dhcp-done 20000
- . /tmp/confviadhcp
- # by now there should be a proper ip configuration present
- if [ -z "$clientip" -o -z "$subnet_mask" -o -z "$broadcast_address" ]
- then error "$init_errdhcp"
- else
- { ip addr add \
- $clientip/$(ipcalc -s -p $clientip $subnet_mask|sed s/.*=//) \
- broadcast $broadcast_address dev $nwif 2>/dev/null || \
- error "$init_erripcfg"; }
- # if gateway is available set it
- [ -n $gateway ] && ip route add default via $gateway 2>/dev/null
- fi
- # fixme: to be checked!!
- # else
- # if [ -n "$file" -a "$srvproto" = "lbd" ] ; then
- # error "$init_erripcfg" nonfatal
- # else
- # error "$init_erripcfg"
- # fi
- # fi
- fi
-fi
-# check if serverip is set as variable @@@serverip@@@
-sed "s,@@@serverip@@@,$serverip," -i /etc/initramfs-setup
-[ $DEBUGLEVEL -eq 20 ] && echo "** finished ip config at $(sysup)"
-
-# on some network adaptors we need to wait for the link to come up
-dmesg | grep -q "link down" && for i in 1 1 1 1 ; do
- dmesg | grep -q "link up" && break
- [ $DEBUGLEVEL -ge 1 ] && echo "network: waited half a second for the \
-link to come up" >>$LOGFILE
- sleep $i
-done
-# ... or ldap if available (in background)
-[ -n "$ldap" ] && ldapconf &
-# ... or via (t)ftp/http file get (in background)
-[ -n "$file" ] && fileget &
-
-runinithook '25-have-ip-config'
-
-## netconsole is disabled in the default config
-# config_netconsole $clientip $oldnwif $nwif $serverip
-
-# if root filesystem should be imported via local or a network block device
-if [ -n "${bldmod}" ] ; then
- # load block device driver(s) if needed
- for module in ${bldmod} ; do
- modprobe ${MODPRV} ${module} || error "$init_errbld"
- done
- mdev -s
- [ -z "$bldrfst" ] && bldrfst=squashfs
- bldhost=$(checkip $bldhost)
- if [ $DEBUGLEVEL -eq 20 ] ; then
- echo "** starting setup of ${bldmod} at $(sysup)"
- else
- echo "Stateless client using ${bldmod} on $bldhost:$bldport with $bldrfst"
- fi
- # fixme: check for fs in /proc/filesystems before trying to load the module
- modprobe ${MODPRV} ${bldrfst} || error "$init_errbld" nonfatal
-
- # for debugging: interface might not be properly up - check reachability
- [ $DEBUGLEVEL -ge 1 ] && ping -c 1 -w 15 ${bldhost} >/dev/null 2>&1
-
- case "${srvproto}" in
- # network block device present in standard kernel
- nbd)
- RDEV=/dev/nbd0
- waitfor "${RDEV}" 20000 || error "$init_nbddev"
- i=0
- while ! nbd-client $bldhost $bldport ${RDEV} -persist ; do
- usleep 100000
- i=$(($i + 1))
- if [ $i -ge 1000 ] ; then
- error "$init_nbds"; break
- fi
- done
- usleep 100
- echo deadline > /sys/block/nbd0/queue/scheduler
- # echo "32" > /sys/block/nbd0/queue/read_ahead_kb
- ;;
- # dnbd2 by Vito Di Leo
- dnbd2)
- RDEV=/dev/vnbd0
- waitfor "${RDEV}" 20000 || error "$init_nbddev"
- # quickhack, should be read in from URI
- echo 1 > /sys/block/vnbd0/config/vid
- echo 1 > /sys/block/vnbd0/config/rid
- # check for others in initramfs-setup and then kernel cmdline
- rootfs="$(sed -n "/rootfs=/p" /etc/initramfs-setup| \
- sed "s,rootfs=,,;s,\",,g") "
- [ "$rootfs" = " " ] && \
- rootfs="$(cat /proc/cmdline|sed "s,.*rootfs=\",,;s,\".*,,") "
- i=0
- # assume no more than 16 different dnbd2 servers (default 4)
- while [ "x$bldhost" != "x" -a $i -lt 16 ]; do
- #echo "I: $i R: $rootfs P:$bldport H:$bldhost"
- echo $bldhost $bldport > /sys/block/vnbd0/server${i}/sock
- i=$(($i + 1))
- rootfs=${rootfs#* }
- bldsp=$(echo ${rootfs}|sed "s, .*,,")
- bldhost=$(uri_token $bldsp server)
- bldport=$(uri_token $bldsp port)
- done
- # the cfq scheduler seem not a good idea here
- echo deadline > /sys/block/vnbd0/queue/scheduler
- # needed for some reason to settle initialization
- sleep 1
- i=0
- while [ $(cat /sys/block/vnbd0/config/running) != 1 ] ; do
- usleep 100000
- echo 1 > /sys/block/vnbd0/config/running
- i=$(($i + 1))
- if [ $i -ge 50 ] ; then
- error "$init_dnbd2s"; break
- fi
- done
- echo "64" > /sys/block/vnbd0/queue/read_ahead_kb
- ;;
- # dnbd by Thorsten Zitterell
- dnbd)
- # quickhack
- RDEV=/dev/dnbd0
- if [ -z $nodnbdcache ] ; then # variable not really used yet
- mkdir /dnbd
- mount -n -o 'size=20%' -t tmpfs tmpfs /dnbd
- ( cat /dev/zero > /dnbd/cache 2>/dev/null || echo "ok" >/tmp/cache ) &
- clientopt="-c /dnbd/cache"
- waitfor /tmp/cache 10000
- fi
- [ $(echo $bldhost|sed "s,\..*,,") -ge 224 ] && \
- ip route add 224.0.0.0/4 dev $nwif
- waitfor /dev/dnbd0 10000 || error "$init_nbddev"
- echo "dnbd-client -b $bldhost -d $RDEV $clientopt"
- while ! dnbd-client -b $bldhost -d $RDEV $clientopt ; do
- usleep 10000
- done
- # problem with squashfs and cfq scheduler
- echo noop > /sys/block/dnbd0/queue/scheduler
- echo 0 > /sys/block/dnbd0/queue/read_ahead_kb
- ;;
- lbd)
- # using clients local block device (disk partition is to be specified
- RDEV=/dev/$blddev
- echo "$bldrfst" >>/etc/filesystems
- realbldrfst=$bldrfst
- # we might need to mount the base layer filesystem first before accessing
- # e.g. a squashfs container file on it
- bldrfst=auto
- ;;
- esac
- RWRO="ro"
- if [ -n "${cowloop}" -a -x /bin/cowdev ] ; then
- modprobe ${MODPRV} cowloop || {
- error "$init_loadcow" nonfatal
- unset cowloop; }
- [ -x /bin/mdev ] && mdev -s
- fi
- if [ -n "${cowloop}" ] ; then
- if [ -n "${unionfs}" -o -n "${aufs}" ] ; then
- error "$init_cownobld"
- unset unionfs aufs
- fi
- echo "Using Copy-on-Write block device for rw access"
- mount -n -t tmpfs -o size=${cowsize} ramfs ${rwdir}
- mkdir /dev/cow && mknod /dev/cow/ctl b 241 255
- usleep 200
- ln -s /dev/cowloop0 /dev/cow/0
- # fixme - cowdev depending on blockdev choosen above ...
- cowdev -a /dev/nbd0 ${rwdir}/nbd.cow
- usleep 200
- RWRO="rw"
- RDEV=/dev/cow/0
- # run ldconfig if not switched off via kernel command line
- ldcfg
- else
- # use normal UnionFS behaviour because rootfs is not NFS
- unset nfsro
- fi
- # finally mount the configured network/local block device
- for i in 0 5000 20000 100000 500000 1000000 ; do
- usleep $i
- mount -n -t $bldrfst -o $RWRO $RDEV /mnt 2>/dev/null && break
- done
- # check if we got the rootfilesystem directly or need to mount a container
- # file from the mounted block device
- if [ "${srvproto}" = "lbd" -a -f /mnt/boot/${slxconf_system_name} ]; then
- mkdir /dev/bootdisk
- mount --move /mnt /dev/bootdisk
- mount -t ${realbldrfst} -o loop \
- /dev/bootdisk/boot/${slxconf_system_name} /mnt || error "$init_errloop"
- fi
- [ $DEBUGLEVEL -eq 20 ] && echo "** finished blockdev setup stuff at $(sysup)"
-elif [ -n ${iscsiserver} ] ; then
- [ $DEBUGLEVEL -eq 20 ] && echo "** started setting up iSCSI initiator at \
-$(sysup)"
- #if [ -n ${iscsitarget} ] ; then
- # echo "InitiatorName=${iscsitarget}"|sed "s,@@@serverip@@@,$serverip," \
- # >/etc/initiatorname.iscsi
- #else
- # discovery
- #fi
- #echo -e "node.startup = automatic">/etc/iscsid.conf
- #iscsid -c /etc/iscsid.conf
- # the cowloop part has to be moved (option for iscsi devices too)
- # and should be generalized for nbd, dnbd, iscsi
-fi
-
-# if no type of root filesystem is passed via kernel command line try
-# information gathered from dhcp process (only valid for nfs)
-if [ -z "${bldmod}" -a -z "${bldhost}" -a -z "${nfsserver}" ] ; then
- # information has to be read from dhcp and ldap configuration
- # cfgcomplete merges all configuration files
- cfgcomplete
-fi
-
-# mount nfs rootfs
-if [ -z "${bldmod}" -a -z "${bldserver}" ] ; then
- [ $DEBUGLEVEL -eq 20 ] && echo "** started nfs mount"
- # read in extended initramfs-setup
- . /etc/initramfs-setup
- # prefer nfsserver and nfspath from kernel commandline over the information
- # gotten from dhcp server
- if [ -n "${nfsserver}" -a -n "${nfspath}" ] ; then
- # check if nfsserver is set as variable @@@serverip@@@
- nfsserver=$(checkip $nfsserver)
- else
- # we got a problem here
- error "$init_nfssp" fatal
- fi
- # interface might not be properly up - check reachability
- ping -c 1 -w 15 ${nfsserver} >/dev/null 2>&1
- # mount the rootfs via nfs readonly (ro)
- fsmount nfs ${nfsserver} ${nfspath} /mnt ro
- #for transport in tcp udp fail; do
- # [ $proto = "fail" ] && { error "$init_nfs"; break; }
- # mount -n -t nfs -o ro,nolock,${transport} ${nfsroot} /mnt && break
- #done
- [ $DEBUGLEVEL -eq 20 ] && echo "** finished nfs mount at $(sysup)"
-fi
-
-runinithook '35-have-network-root'
-
-# get the complete collection of kernel modules and firmwares available
-testmkd /lib/firmware
-mount -n --bind /mnt/lib/modules /lib/modules && \
-mount -n --bind /mnt/lib/firmware /lib/firmware || error "$init_moddir"
-# start hardware configuration as background process if not a special
-# debuglevel (21) is used for the option of manual hwautocfg start
-if [ ${DEBUGLEVEL} = 21 ] ; then
- echo "You can run 'hwautocfg main &' manually now ..."
- /bin/sh
-else
- [ $DEBUGLEVEL -eq 20 ] && echo "** started hwautocfg in background at \
-$(sysup)"
- hwautocfg main &
-fi
-
-runinithook '40-started-hw-config'
-
-# unionfs/aufs modules visible by now if installed, try to use aufs for rw
-# access if available
-union_type=""
-if [ ${aufs} -eq 1 ] && \
- modprobe ${MODPRV} aufs 2>/dev/null && \
- lsmod | grep -qe "^aufs" ; then union_type="AUFS"
-elif [ ${unionfs} -eq 1 ] && \
- modprobe ${MODPRV} unionfs 2>/dev/null && \
- lsmod | grep -qe "^unionfs" ; then union_type="UnionFS"
-elif [ ${aufs} -eq 0 -a ${unionfs} -eq 0 -a -z "${cowloop}" ] ; then
- error "$init_deselau" nonfatal
- unset aufs unionfs
-else
- error "$init_loadaufs" nonfatal
- unset aufs unionfs
-fi
-
-# runtimer
-[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
- echo "** Filesystem setup started at $(sysup)"
-# setup of client root filesystem dependent on the availability of UnionFS
-if [ "x${union_type}" != "x" ] ; then
- echo "Using ${union_type} for rw access"
- mkdir -p ${rwdir}/union ${rwdir}/uniontmp /rorootfs
- # adapting tempfs size of the device directory (takes /tmp in stage4)
- mount -o remount,size=${tmpfssize} ${devdir}
- mount -n -t tmpfs -o size=${tmpfssize} none ${rwdir}/uniontmp
- # hack for handling unionfs with patched run-init
- mount -n --move /mnt /rorootfs
- if [ "$union_type" == "UnionFS" ]; then
- mount -n -t unionfs -o dirs=${rwdir}/uniontmp:/rorootfs=${nfsro}ro \
- none /mnt
- elif [ "$union_type" == "AUFS" ]; then
- mount -n -t aufs -o br:/${rwdir}/uniontmp:/rorootfs=ro none /mnt
- fi
- mkdir -p /mnt/uniontmp
- mount -n --move ${rwdir}/uniontmp /mnt/uniontmp
- chmod 0755 /mnt/uniontmp /mnt
- # running hardware disk/tmp setup now
- hwautocfg disk &
- # run ldconfig if switched on via kernel command line (token ldsc) or
- # triggered by unionized root filesystem
- ldcfg
-elif [ -z "${cowloop}" ] ; then
- # fire up hardware disk/tmp setup first
- hwautocfg disk &
- echo "Using bind mounts to ramdisk for rw access"
- mount -n -t tmpfs -o size=75% ramfs ${rwdir}
- for path in ${D_BINDMPTS} ; do
- mkdir -p ${rwdir}/${path} >/dev/null 2>&1
- mount -n --bind ${rwdir}/${path} /mnt/${path}
- [ ${DEBUGLEVEL} -gt 1 -a ${DEBUGLEVEL} != 8 ] && \
- echo "Created ${rwdir}/${path} and mounted it to /mnt/$path"
- done
- # see above ...
- ldcfg
- # save the RO directories mentioned in the distro-specific
- # config to a temporary directory. They will later on be restored
- for path in ${D_RODIRSINRW}; do
- if [ -d /mnt/${path} ] ; then
- list="${path} ${list}"
- # exclude them from etc copy process too
- echo "${path}/*"|sed -e "s,/root/,,;s,^/,," >>/tmp/etc.exclude
- mkdir -p /root/${path} >/dev/null 2>&1
- mount -n --bind /mnt/${path} /root/${path} >/dev/null 2>&1
- fi
- done
- for path in /etc/${D_SYSCONFDIR} ${D_DIRINBINDMNT} ${list}; do
- mkdir -p ${rwdir}/${path}
- done
- testmkd ${rwdir}/var/tmp 1777
- # exclude all sysv runlevel link stuff
- for i in ${D_RCDIRS} ${D_INITBOOTD} ; do
- echo "*$i/*" >>/tmp/etc.exclude
- done
- # add list of files to be excluded and common excludes to the filter list
- echo -e "-\ndhcp*\n*~\n*.old\n*-\nxorg.conf*" >>/tmp/etc.exclude
- # if ld.so.cache is to be generated then do not copy the file
- [ -n "${ldsc}" ] && echo -e "ld.so.cache*" >>/tmp/etc.exclude
- # for tar exclude lists might be used, more difficult for cp
- cd /mnt
- tar -X /tmp/etc.exclude -cp etc/*|tar -xp -C ${rwdir} 2>/dev/null
- cd /
- mount -n --bind ${rwdir}/etc /mnt/etc
- mount -n --bind ${rwdir}/var /mnt/var
- # get the "covered" mounts back into filesystem structure
- for path in ${list}; do
- mount -n --move /root/$path /mnt/$path #>>$LOGFILE 2>&1
- done
- #rm -rf /root/* >/dev/null 2>&1
- # run some specific stuff !?
-fi
-
-runinithook '50-have-layered-fs'
-
-# generate a set of default directories
-. /etc/openslx.conf
-for dir in $OPENSLX_DEFAULT_LOGDIR $OPENSLX_DEFAULT_BINDIR \
- $OPENSLX_DEFAULT_LIBDIR $OPENSLX_DEFAULT_VIRTDIR; do
- testmkd /mnt/$dir
-done
-chmod -R 1777 /mnt/${OPENSLX_DEFAULT_LOGDIR}
-
-# script for stuff to execute during early bootup
-d_mkrlscript init boot.slx "Running configuration postponed from InitRamFS"
-echo "fs complete at $(sysup)" >/tmp/fscmpl
-# runtimer
-[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
- echo "** Filesystem setup completed at $(sysup)"
-
-# write debug file information after filesystem setup completed
-echo -e "# /etc${D_SYSCONFDIR}/logfile - file created by $0 (initramfs \
-from $date)\n#\n# logfile \
-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
-# services (offer debug shell in runlevel 22)
-if [ ${DEBUGLEVEL} = 22 ] ; then
- /bin/sh
-else
- servconfig &
-fi
-
-for path in /tmp/scratch /var/lib/nobody ${D_DIRINDXS} ${D_DIRINBINDMNT} ; do
- testmkd /mnt/${path}
-done
-# Needed writable subdirs nested in readonly subdirs of writable one
-for path in ${D_RWDIRSINRO}; do
- mount -n -t tmpfs none /mnt/${path}
-done
-for i in /var/run/utmp /var/log/wtmp /var/log/lastlog /etc/mtab ; do
- echo -n > /mnt/$i
-done
-chown 65534:0 /mnt/var/lib/nobody
-echo -e "# /etc/fstab - file generated by $0 (initramfs from $date)\n#\
-\tOpenSLX Project, info@openslx.com\n\nrootfs\t\t/\t\trootfs\t\tro\t\t 0 0\n\
-proc\t\t/proc\t\tproc\t\tdefaults\t 0 0\ninitramdevs\t/dev\t\ttmpfs\
-\t\trw\t\t 0 0\ndevpts\t\t/dev/pts\tdevpts\t\tmode=0620,gid=5\t 0 0" \
- >/mnt/etc/fstab || error "$init_fstab"
-echo -e "rootfs / rootfs rw 0 0\ninitramdevs /dev tmpfs rw\
- 0 0" > /mnt/etc/mtab
-
-# copy library cache if generated
-if [ -n "${ldsc}" ] ; then
- # creating library cache takes a while ...
- if waitfor /tmp/ldcfg 50000 ; then
- test -s /mnt/tmp/ld.so.cache && \
- mv /mnt/tmp/ld.so.cache /mnt/etc/ld.so.cache
- else
- error "$init_errldcfg"
- fi
-else
- [ $DEBUGLEVEL -gt 2 ] && error "$init_infldcfg" nonfatal
-fi
-
-runinithook '60-have-servconfig'
-
-# wait a while for hardware setup to complete and start cleanup procedure
-[ $DEBUGLEVEL -gt 1 ] && echo "Waiting for hwautocfg to finish ..."
-waitfor /tmp/hwcfg 20000 || error "$init_errhw"
-hwautocfg finish &
-
-# wait a while for services setup to complete
-[ $DEBUGLEVEL -gt 1 ] && echo "Waiting for servconfig to finish ..."
-waitfor /tmp/svcfg 10000 || error "$init_errsw"
-# IP configuration is complete and should not be updated automatically
-killall -9 udhcpc 2>/dev/null
-
-# if uniondirs is not set yet, maybe the unions were given via initramfs-setup
-if [ -z "$uniondirs" ]; then
- if [ "$union_type" == "AUFS" ]; then
- # does it contain "://"?
- if [ "$aufs" != "${aufs#*://}" ]; then
- uniondirs="$aufs"
- fi
- elif [ "$union_type" == "UnionFS" ]; then
- # does it contain "://"?
- if [ "$unionfs" != "${unionfs#*://}" ]; then
- uniondirs="$unionfs"
- fi
- fi
-fi
-# if locations are given that should be unioned with the fs root, do it
-if [ -n "$uniondirs" ]; then
- include_in_fsroot_union "$union_type" "$uniondirs"
-fi
-
-runinithook '70-before-plugins'
-
-# ddcinfo temporary overwrite (with kernel cmdline ddcinfo=1)
-if [ "${ddcinfo}" = "1" -a -f /initramfs/plugin-conf/xserver.conf ]; then
- echo 'xserver_ddcinfo="1"' >> /initramfs/plugin-conf/xserver.conf
-fi
-
-# runtimer
-[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
- echo "** Plugin configuration started at $(sysup)"
-
-# check for any plugin-specific runlevel scripts and run them, if found:
-if [ ${DEBUGLEVEL} = 25 ] ; then
- /bin/sh
-else
- if [ -d /etc/plugin-init.d ]; then
- for plugin_starter in /etc/plugin-init.d/*.sh; do
- if [ -e $plugin_starter ]; then
- [ $DEBUGLEVEL -gt 0 ] \
- && echo -n "Running plugin starter $plugin_starter ..."
- [ $DEBUGLEVEL -eq 15 ] \
- && sed '/^#!/ a\\set -x' -i $plugin_starter
- init-wrapper $plugin_starter >>/tmp/plugin_starter 2>&1
- if [ $? -eq 0 ]; then
- [ $DEBUGLEVEL -gt 0 ] \
- && echo " ok"
- else
- [ $DEBUGLEVEL -gt 0 ] \
- && echo " failed"
- fi
- fi
- done
- # load variables defined by plugins to current environment
- [ -f /tmp/env/wrapper.env ] && . /tmp/env/wrapper.env
- fi
-fi
-
-runinithook '80-after-plugins'
-
-# runtimer
-[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
- echo "** Plugin configuration finished at $(sysup)"
-
-# create links for initial stage4 boot scripts
-initial_boot
-
-runinithook '85-have-initial-boot'
-
-# post init for some distro specific stuff to run
-postinit
-# general postinit.local configurable by the admin via openslx/config/<system>
-[ -f /initramfs/postinit.local ] && {
- [ $DEBUGLEVEL -gt 0 ] && \
- echo -n "Running script /bin/postinit.local ... "
- chmod u+x /initramfs/postinit.local
- /initramfs/postinit.local
- [ $DEBUGLEVEL -gt 0 ] && echo "ok"; }
-
-# start a debug shell in higher debug levels
-[ $DEBUGLEVEL -gt 2 -a $DEBUGLEVEL != 8 ] \
- && echo "DEBUGLEVEL>2: starting debug-shell, exit with CTRL+D" && /bin/sh
-
-runinithook '90-postinit-done'
-
-# unmount the bind mounted modules, firmware directories and nfs /tmp/scratch
-# (if present)
-export ticks
-for ticks in 0 1 2 5 10 20 30; do
- sleep $ticks && umount -n /lib/modules 2>/dev/null && break
- error "$init_wait" nonfatal
-done
-for ticks in 0 1 2 5 10 20 30; do
- sleep $ticks && umount -n /lib/firmware 2>/dev/null && break
- error "$init_wait" nonfatal
-done
-mount 2>/dev/null | grep -q "/tmp/scratch type nfs" && \
- for ticks in 0 1 2 5 10 20 30; do
- sleep $ticks && umount -n /tmp/scratch 2>/dev/null && break
- done
-
-mount 2>/dev/null | grep -q /lib/modules && error "$init_errumnt"
-# close runlevel script for stuff to execute during early bootup
-d_mkrlscript close boot.slx ""
-# put /tmp into stage4 mtab and add stuff to stage4 fstab
-sed -n "s,/mnt,,;/\/tmp /p" /proc/mounts >> /mnt/etc/mtab
-[ -f /tmp/fstab ] && cat /tmp/fstab >> /mnt/etc/fstab
-# preparations to leave initramfs - umounting ...
-umount -n /sys || error "$init_errsys" nonfatal
-chmod 1777 /dev/shm /mnt/tmp 2>/dev/null
-
-runinithook '95-cleanup'
-
-# kill hwautocfg, servconfig, hwinfo, syslogd, etc.
-killall -9 hwautocfg servconfig debugshell hwinfo syslogd logread 2>/dev/null
-
-# runtimer
-[ $DEBUGLEVEL -eq 8 -o $DEBUGLEVEL -eq 20 ] && \
- echo "** SLX init ended near $(sysup)"
-# kill the watchdog (autopoweroff, if stage3 init never finishes)
-[ -f /tmp/watchdogpid ] && kill $(cat /tmp/watchdogpid) 2>/dev/null
-# stop logging services if required and move logfile into stage4 filesystem
-# (if exists)
-killall klogd 2>/dev/null
-[ -f /var/log/slx-boot.log ] && mv /var/log/slx-boot.log \
- /mnt/var/log/slx-s3boot.log
-[ -f /var/log/messages ] && cp /var/log/messages \
- /mnt/var/log/slx_messages 2>/dev/null
-# if no syslog plugin was configured, start the daemon again writing to no
-# logfile directly (useless fake test as placeholder)
-# THIS IS NOT WORKING SOMEHOW!!
-#[ ! -d /mnt/opt/openslx/plugin-repo/syslog/ ] && syslogd -O /mnt/var/log/testfile
-
-# move /dev and unmount /proc and unset all old, unneeded environment
-# variables
-mount -n --move /dev /mnt/dev
-umount -n /proc
-unset client debug date initrd ip bldroot macaddr nwif nfsroot rootfs ticks \
- vci vga
-unset BOOT_IMAGE KCMDLINE KERNEL MODPRV NWMODULES OLDPWD UDEVD_EVENT_TIMEOUT \
- SLXVERSION UDEVD_EXPECTED_SEQNUM PATH
-
-runinithook '99-handing-over'
-
-# new style of pivoting (switch_root or run-init)
-exec /sbin/switch_root -c dev/console /mnt /sbin/init $DEBUG_UPSTART || \
- error "$init_runinit"
diff --git a/kcl_ip_config b/kcl_ip_config
deleted file mode 100644
index 1394a22..0000000
--- a/kcl_ip_config
+++ /dev/null
@@ -1 +0,0 @@
-ip=10.8.4.107:10.8.4.3:10.8.4.254:255.255.255.0
diff --git a/notes-1.txt b/notes-1.txt
deleted file mode 100644
index d3e0f6d..0000000
--- a/notes-1.txt
+++ /dev/null
@@ -1,386 +0,0 @@
-test
-
-wget -qO - "$@" http://132.230.4.3/uniontmp.php | tar -C testdownload/ -zxvf -
-
-
-Whitelist:
-tar cz --file=/home/mp57/whitelist --ignore-failed-read --exclude=.wh* ./*
-
-Blacklist:
-find /uniontmp/ -name .wh* >> /home/mp57/blacklist
-
-
-http://piratepad.net/master-projekt
-Whiteliste anlegen
-echo '#!/bin/sh' > whitelist.sh
-find * -printf 'chmod %m %p\n' >> whitelist.sh
-chmod a+x whitelist.sh
-
-Setzen aller Ordner auf 777
-chmod -R 755 ./*
-
-Gepackt werden (bleibt mit ordnerberechtigung 755 auf dem server
-nach herunterladen müssen die dateiberechtigugnen wieder gesetzt werden
-./whitelist.sh
-
-
-http://akrabat.com/zend-framework-tutorial/
-
-http://lab.ks.uni-freiburg.de/projects/preboot/wiki/ZendWebInterface
-http://lab.ks.uni-freiburg.de/projects/preboot/wiki/Zend_einrichten
-
-##############################################################
-controller erstellen
-zf create controller person
-zf create action register person
-zf create action login person
-zf create action edit person
-zf create action request person
-
-datenbankanbindung in der application.ini setzen
- resources.db.adapter = PDO_MYSQL
- resources.db.params.host = localhost
- resources.db.params.username = rob
- resources.db.params.password = 123456
- resources.db.params.dbname = pbs
-
-Datenbank initialisieren (pbs datenbank anlegen
- pbs.sql einfügen
-
-
-zf create db-table Person pbs_person
-=> erstellt application/models/DbTable/Person.php
-
-Mapper erstellen
- zf create model PersonMapper
-=> erstellt application/models/PersonMapper.php
-http://framework.zend.com/manual/en/learning.quickstart.create-model.html
-
- zf create model Person
-=> erstellt /var/www/pbs/application/models/Person.php
-
-zf create controller Person
-
-
-
-
-
-
-
-
-
-
-
-
-
-<!-- application/views/scripts/guestbook/index.phtml -->
-
-<p><a href="<?php echo $this->url(
- array(
- 'controller' => 'guestbook',
- 'action' => 'sign'
- ),
- 'default',
- true) ?>">Sign Our Guestbook</a></p>
-
-Guestbook Entries: <br />
-<dl>
- <?php foreach ($this->entries as $entry): ?>
- <dt><?php echo $this->escape($entry->email) ?></dt>
- <dd><?php echo $this->escape($entry->comment) ?></dd>
- <?php endforeach ?>
-</dl>
-
-
-
-
-
-
-<?php
-// application/models/PersonMapper.php
-
-class Application_Model_PersonMapper
-{
-protected $_dbTable;
-
-public function setDbTable($dbTable)
-{
- if (is_string($dbTable)) {
- $dbTable = new $dbTable();
- }
- if (!$dbTable instanceof Zend_Db_Table_Abstract) {
- throw new Exception('Invalid table data gateway provided');
- }
- $this->_dbTable = $dbTable;
- return $this;
-}
-
-public function getDbTable()
-{
- if (null === $this->_dbTable) {
- $this->setDbTable('Application_Model_DbTable_Person');
- }
- return $this->_dbTable;
-}
-
-public function save(Application_Model_Person $person)
-{
- $data = array(
- 'title' => $person->getTitle(),
- 'name' => $person->getName(),
- 'firstname' => $person->getFirstname(),
- 'street' => $person->getStreet(),
- 'housenumber' => $person->getHousenumber(),
- 'city' => $person->getCity(),
- 'postalcode' => $person->getPostalcode(),
- 'logindate' => $person->getlogindate(),
- 'registerdate' => $person->getRegisterdate(),
- 'email' => $person->getEmail(),
- 'login' => $person->getLogin(),
- 'password' => $person->getPassword()
- );
-
- if (null === ($id = $person->getPersonID())) {
- unset($data['personID']);
- $this->getDbTable()->insert($data);
- } else {
- $this->getDbTable()->update($data, array('personID = ?' => $id));
- }
-}
-
-public function find($id, Application_Model_Person $person)
-{
- $result = $this->getDbTable()->find($id);
- if (0 == count($result)) {
- return;
- }
- $row = $result->current();
- $guestbook->setPersonID($row->personID)
- ->setTitle($row->title)
- ->setName($row->name)
- ->setFirstname($row->firstname)
- ->setStreet($row->street)
- ->setHousenumber($row->housenumber)
- ->setCity($row->city)
- ->setPostalcode($row->postalcode)
- ->setLogindate($row->logindate)
- ->setRegisterdate($row->registerdate)
- ->setEmail($row->email)
- ->setLogin($row->login)
- ->setPassword($row->password);
-}
-
-public function fetchAll()
-{
- $resultSet = $this->getDbTable()->fetchAll();
- $entries = array();
- foreach ($resultSet as $row) {
- $entry = new Application_Model_Person();
- $entry->setPersonID($row->personID)
- ->setTitle($row->title)
- ->setName($row->name)
- ->setFirstname($row->firstname)
- ->setStreet($row->street)
- ->setHousenumber($row->housenumber)
- ->setCity($row->city)
- ->setPostalcode($row->postalcode)
- ->setLogindate($row->logindate)
- ->setRegisterdate($row->registerdate)
- ->setEmail($row->email)
- ->setLogin($row->login)
- ->setPassword($row->password);
- $entries[] = $entry;
- }
- return $entries;
-}
-}
-
-
-
-
-<?php
-// application/models/Person.php
-
-class Application_Model_Person
-{
- protected $_title;
- protected $_name;
- protected $_firstname;
- protected $_street;
- protected $_housenumber;
- protected $_city;
- protected $_postalcode;
- protected $_logindate;
- protected $_registerdate;
- protected $_email;
- protected $_login;
- protected $_password;
- protected $_personID;
-
- public function __construct(array $options = null)
- {
- if (is_array($options)) {
- $this->setOptions($options);
- }
- }
-
- public function __set($name, $value)
- {
- $method = 'set' . $name;
- if (('mapper' == $name) || !method_exists($this, $method)) {
- throw new Exception('Invalid person property');
- }
- $this->$method($value);
- }
-
- public function __get($name)
- {
- $method = 'get' . $name;
- if (('mapper' == $name) || !method_exists($this, $method)) {
- throw new Exception('Invalid person property');
- }
- return $this->$method();
- }
-
- public function setOptions(array $options)
- {
- $methods = get_class_methods($this);
- foreach ($options as $key => $value) {
- $method = 'set' . ucfirst($key);
- if (in_array($method, $methods)) {
- $this->$method($value);
- }
- }
- return $this;
- }
-
- public function setTitle($text)
- {
- $this->_title = (string) $text;
- return $this;
- }
- public function getTitle()
- {
- return $this->_title;
- }
-
- public function setName($text)
- {
- $this->_name = (string) $text;
- return $this;
- }
- public function getName()
- {
- return $this->_name;
- }
- public function setFirstname($text)
- {
- $this->_firstname = (string) $text;
- return $this;
- }
- public function getFirstname()
- {
- return $this->_firstname;
- }
-
- public function setStreet($text)
- {
- $this->_street = (string) $text;
- return $this;
- }
- public function getStreet()
- {
- return $this->_street;
- }
-
- public function setHousenumber($text)
- {
- $this->_housenumber = (string) $text;
- return $this;
- }
- public function getHousenumber()
- {
- return $this->_housenumber;
- }
-
- public function setCity($text)
- {
- $this->_city = (string) $text;
- return $this;
- }
- public function getCity()
- {
- return $this->_city;
- }
-
- public function setPostalcode($text)
- {
- $this->_postalcode = (string) $text;
- return $this;
- }
- public function getPostalcode()
- {
- return $this->_postalcode;
- }
- public function setLogindate($text)
- {
- $this->_logindate = (string) $text;
- return $this;
- }
- public function getLogindate()
- {
- return $this->_logindate;
- }
- public function setRegisterdate($text)
- {
- $this->_registerdate = (string) $text;
- return $this;
- }
- public function getRegisterdate()
- {
- return $this->_registerdate;
- }
-
- registerdate
-
- public function setEmail($email)
- {
- $this->_email = (string) $email;
- return $this;
- }
- public function getEmail()
- {
- return $this->_email;
- }
-
- public function setLogin($login)
- {
- $this->_login = (string) $login;
- return $this;
- }
- public function getLogin()
- {
- return $this->_login;
- }
- public function setPassword($login)
- {
- $this->_password = (string) $login;
- return $this;
- }
- public function getPassword()
- {
- return $this->_password;
- }
-
-
- public function setPersonID($id)
- {
- $this->_personID = (int) $id;
- return $this;
- }
- public function getPersonID()
- {
- return $this->_personID;
- }
-}
-
diff --git a/notes-2.txt b/notes-2.txt
deleted file mode 100644
index 39718f5..0000000
--- a/notes-2.txt
+++ /dev/null
@@ -1,76 +0,0 @@
-drop trigger if exists GroupGroups_Trigger;
-
-CREATE TRIGGER Groups_Trigger
-BEFORE delete ON pbs_group
-FOR EACH ROW
- INSERT INTO pbs_groupgroups g SET g.parentID = (SELECT parentID FROM pbs_groupgroups WHERE groupID = old.gro
-
-INSERT INTO pbs_group (title) VALUES ('testgruppe1');
-INSERT INTO pbs_group (title) VALUES ('testgruppe2');
-INSERT INTO pbs_group (title) VALUES ('testgruppe3');
-INSERT INTO pbs_group (title) VALUES ('testgruppe4');
-INSERT INTO pbs_group (title) VALUES ('testgruppe5');
-INSERT INTO pbs_groupgroups (parentID,groupID) VALUES (1,2);
-INSERT INTO pbs_groupgroups (parentID,groupID) VALUES (2,3);
-INSERT INTO pbs_groupgroups (parentID,groupID) VALUES (1,4);
-INSERT INTO pbs_groupgroups (parentID,groupID) VALUES (3,5);
-
-Löschen von Gruppen
-
-Case 1. Lösche alle Untergruppen
-Case 2. Untergruppen werden an Root gehängt
-Case 2. Untergruppen werden an alle Obergruppen der Gruppe gehängt (Authorisation der Obergruppe?)
-Case 3. Untergruppen werden an bestimmte Obergruppen gehängt (Authorisation der Obergruppe?)
-
-Löschen von Groupgroups
-
-Case1. Gruppe hat noch andere Obergruppen -> tue nichts
-Case2. Gruppe hat keine Obergruppen mehr -> hänge gruppe an root
-
-Gruppen verwalten
-
-root-gruppen
-Gruppen die unter Root hängen repräsentieren eine PBS-Datenbank Instanz, sog. root-gruppen (z.b. PBS-Server1)
-root-gruppen können nicht gelöscht werden
-root-gruppen können Untergruppen anlegen und wieder löschen
-root-gruppen besitzen angehörige, rollen, rechte
-angehörige mit den nötigen Rechten können Untergruppen erstellen und löschen.
-angehörige mit den nötigen Rechten können Personen anlegen, angehörigkeiten und rollen zuweisen
-angehörige mit den nötigen Rechten können rechte erstellen, ändern und löschen
-angehörige mit den nötigen Rechten können Untergruppen einen oder mehreren Gruppen unterstellen
-
-Gruppen
-Jede Gruppe kann mehrere Untergruppen erstellen und löschen
-Gruppen können sich nicht selbst löschen
-
-Jede Gruppe außer root-gruppen können mehrere Obergruppen besitzen
-
-
-
-Sanity Checks
-
-Constraints
-
-1. Group -> Groupgroups
-1. Groupgroups -> group, group
-2. Grouprequests -> person, group
-3. RightRoles -> role, right
-4. Membership -> role, group, right
-5. Role -> group
-6. Config -> membership
-7. BootOs -> group
-8. Bootmenuentries -> bootos, bootmenu
-9. Bootmenu -> membership
-10. BootIso -> membership
-11. Session -> client, bootos
-12. MembershipFilters -> membership, filter
-13. Poolentries -> pool, client
-14. Filter -> membership, bootmenu
-15. Poolfilters -> pool, filter
-16. Filterentries -> filter, filtertype
-
-Not Null
-...
-
-
-
diff --git a/api_test.html b/scripts/api_test.html
index 754740c..754740c 100644
--- a/api_test.html
+++ b/scripts/api_test.html
diff --git a/dbContent.php b/scripts/dbContent.php
index a704ec2..a704ec2 100644
--- a/dbContent.php
+++ b/scripts/dbContent.php
diff --git a/dbContent.png b/scripts/dbContent.png
index 86c297a..86c297a 100644
--- a/dbContent.png
+++ b/scripts/dbContent.png
Binary files differ
diff --git a/send-post.html b/scripts/fbgui-test.html
index b89df3b..b89df3b 100644
--- a/send-post.html
+++ b/scripts/fbgui-test.html
diff --git a/zend-su.sh b/scripts/local-install.sh
index 37c1c6d..37c1c6d 100755
--- a/zend-su.sh
+++ b/scripts/local-install.sh
diff --git a/mysqlGraph.php b/scripts/mysqlGraph.php
index b9012b2..b9012b2 100644
--- a/mysqlGraph.php
+++ b/scripts/mysqlGraph.php
diff --git a/mysqlGraph.png b/scripts/mysqlGraph.png
index 54d0ae5..54d0ae5 100644
--- a/mysqlGraph.png
+++ b/scripts/mysqlGraph.png
Binary files differ
diff --git a/pbs-newdata.sql b/setup/pbs-newdata.sql
index 0c1fffb..0c1fffb 100644
--- a/pbs-newdata.sql
+++ b/setup/pbs-newdata.sql
diff --git a/pbs.sql b/setup/pbs.sql
index ebcdbef..ebcdbef 100644
--- a/pbs.sql
+++ b/setup/pbs.sql
diff --git a/template.php b/template.php
deleted file mode 100644
index bd23d4a..0000000
--- a/template.php
+++ /dev/null
@@ -1,37 +0,0 @@
-<?php
-/*
- * Copyright (c) 2011 - OpenSLX GmbH, RZ Uni Freiburg
- * This program is free software distributed under the GPL version 2.
- * See http://gpl.openslx.org/
- *
- * If you have any feedback please consult http://feedback.openslx.org/ and
- * send your suggestions, praise, or complaints to feedback@openslx.org
- *
- * General information about OpenSLX can be found at http://openslx.org/
- */
- ?>
-<div class='listelement'>
-
- <?php if(count($this->sessions)==0)
- echo "There are no Sessions to display." ?>
- <?php foreach ($this->sessions as $session): ?>
- <div class='element'>
- <div class='number'>ID</div>
- <div class='content'>
- <div class='actions'>
- <a><img alt='action1'/> </a>
- <a><img alt='action2'/> </a>
- </div>
- <div class='title'>Title</div>
- <div class='subtitle'>Subtitle</div>
- <div class='details dispnone'>
- <label>Description1</label>
- <div class='item'>Element2</div>
- <label>Description2</label>
- <div class='item'>Element2</div>
- </div>
- </div>
- <div class='clear'></div>
- </div>
- <?php endforeach ?>
-</div>
diff --git a/ubuntu-init b/ubuntu-init
deleted file mode 100644
index e7bfa9e..0000000
--- a/ubuntu-init
+++ /dev/null
Binary files differ
diff --git a/zend-user.sh b/zend-user.sh
deleted file mode 100644
index 16ba63e..0000000
--- a/zend-user.sh
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-cp /tmp/pbs2/application/configs/application.ini.dist /tmp/pbs2/application/configs/application.ini
-mysql -u root -p </tmp/pbs2/pbs.sql
-mysql -u root -p </tmp/pbs2/pbs-newdata.sql