diff options
| author | Michael Neves | 2013-05-03 18:48:28 +0200 |
|---|---|---|
| committer | Michael Neves | 2013-05-03 18:48:28 +0200 |
| commit | be387c4d3d969c7a0a05371647858f1faa97b9d2 (patch) | |
| tree | 2ebfc5c40b1da7f21f36e70a1449bf3d8447f677 | |
| parent | vmchooser (diff) | |
| parent | Merge branch 'master' of git:openslx-ng/tm-scripts (diff) | |
| download | tm-scripts-be387c4d3d969c7a0a05371647858f1faa97b9d2.tar.gz tm-scripts-be387c4d3d969c7a0a05371647858f1faa97b9d2.tar.xz tm-scripts-be387c4d3d969c7a0a05371647858f1faa97b9d2.zip | |
Merge branch 'master' of git.openslx.org:openslx-ng/tm-scripts
| -rw-r--r-- | data/kernel.wanted.config | 75 | ||||
| -rw-r--r-- | helper/kernel.inc | 17 | ||||
| -rw-r--r-- | remote/modules/rsyslogd/data/etc/rsyslog.conf | 208 | ||||
| -rw-r--r-- | remote/modules/rsyslogd/rsyslogd.conf | 2 | ||||
| -rwxr-xr-x | remote/rootfs/rootfs-stage31/data/init | 62 | ||||
| -rw-r--r-- | remote/rootfs/rootfs-stage31/rootfs-stage31.conf | 18 | ||||
| -rwxr-xr-x | server/export_target | 4 |
7 files changed, 190 insertions, 196 deletions
diff --git a/data/kernel.wanted.config b/data/kernel.wanted.config index 4b36464f..05eb508a 100644 --- a/data/kernel.wanted.config +++ b/data/kernel.wanted.config @@ -92,6 +92,81 @@ CONFIG_EXT4_FS_SECURITY=y CONFIG_EXT4_FS_XATTR=y CONFIG_EXT4_USE_FOR_EXT23=y CONFIG_EXYNOS_VIDEO=y +#CONFIG_FB_3DFX_ACCEL=y +#CONFIG_FB_3DFX_I2C=y +#CONFIG_FB_3DFX=y +#CONFIG_FB_ARC=y +#CONFIG_FB_ARK=y +#CONFIG_FB_ASILIANT=y +#CONFIG_FB_ATY128_BACKLIGHT=y +#CONFIG_FB_ATY128=y +#CONFIG_FB_ATY_BACKLIGHT=y +#CONFIG_FB_ATY_CT=y +#CONFIG_FB_ATY_GX=y +#CONFIG_FB_ATY=y +#CONFIG_FB_BACKLIGHT=y +CONFIG_FB_BOOT_VESA_SUPPORT=y +#CONFIG_FB_BROADSHEET=y +#CONFIG_FB_CARILLO_RANCH=y +#CONFIG_FB_CARMINE_DRAM_EVAL=y +#CONFIG_FB_CARMINE=y +#CONFIG_FB_CIRRUS=y +#CONFIG_FB_CYBER2000_DDC=y +#CONFIG_FB_CYBER2000=y +#CONFIG_FB_DDC=y +#CONFIG_FB_DEFERRED_IO=y +#CONFIG_FB_GEODE_GX1=y +#CONFIG_FB_GEODE_GX=y +#CONFIG_FB_GEODE_LX=y +#CONFIG_FB_GEODE=y +#CONFIG_FB_I740=y +#CONFIG_FB_IMSTT=y +#CONFIG_FB_KYRO=y +#CONFIG_FB_LE80578=y +#CONFIG_FB_MATROX_G=y +#CONFIG_FB_MATROX_I2C=y +#CONFIG_FB_MATROX_MAVEN=y +#CONFIG_FB_MATROX_MILLENIUM=y +#CONFIG_FB_MATROX_MYSTIQUE=y +#CONFIG_FB_MATROX=y +#CONFIG_FB_MB862XX_I2C=y +#CONFIG_FB_MB862XX_PCI_GDC=y +#CONFIG_FB_MB862XX=y +#CONFIG_FB_METRONOME=y +#CONFIG_FB_NEOMAGIC=y +#CONFIG_FB_NVIDIA_BACKLIGHT=y +#CONFIG_FB_NVIDIA_I2C=y +#CONFIG_FB_NVIDIA=y +#CONFIG_FB_PM2_FIFO_DISCONNECT=y +#CONFIG_FB_PM2=y +#CONFIG_FB_PM3=y +#CONFIG_FB_RADEON_BACKLIGHT=y +#CONFIG_FB_RADEON_I2C=y +#CONFIG_FB_RADEON=y +#CONFIG_FB_RIVA_BACKLIGHT=y +#CONFIG_FB_RIVA_I2C=y +#CONFIG_FB_RIVA=y +#CONFIG_FB_S3_DDC=y +#CONFIG_FB_S3=y +#CONFIG_FB_SAVAGE_ACCEL=y +#CONFIG_FB_SAVAGE_I2C=y +#CONFIG_FB_SAVAGE=y +#CONFIG_FB_SIS_300=y +#CONFIG_FB_SIS_315=y +#CONFIG_FB_SIS=y +#CONFIG_FB_SMSCUFX=y +#CONFIG_FB_SVGALIB=y +#CONFIG_FB_SYS_COPYAREA=y +#CONFIG_FB_SYS_FILLRECT=y +#CONFIG_FB_SYS_FOPS=y +#CONFIG_FB_SYS_IMAGEBLIT=y +#CONFIG_FB_TRIDENT=y +#CONFIG_FB_UDL=y +CONFIG_FB_VESA=y +#CONFIG_FB_VIA_X_COMPATIBILITY=y +#CONFIG_FB_VIA=y +#CONFIG_FB_VOODOO1=y +#CONFIG_FB_VT8623=y CONFIG_FEALNX=y CONFIG_FORCEDETH=y CONFIG_GENERIC_GPIO=y diff --git a/helper/kernel.inc b/helper/kernel.inc index 41a9c507..2482a128 100644 --- a/helper/kernel.inc +++ b/helper/kernel.inc @@ -42,8 +42,23 @@ copy_kernel_modules() { local KERNEL_MODULES_DIR="lib/modules/${KERNEL_NEW_VERSION}" local KERNEL_MODULES_LIST="" + local REQUIRED_KERNEL_MODULES_EXPANDED="" + local KERNEL_MODULE="" + local KERNEL_MODULE_PATH="" + local ELEM="" + + # Do some fancy stuff to allow wildcards etc. in required kernel modules. + cd "${KERNEL_MODULES_DIR}" + for KERNEL_MODULE in ${REQUIRED_KERNEL_MODULES}; do + for ELEM in $KERNEL_MODULE; do + echo $ELEM | grep '\*' && pwarning "Could not expand '$ELEM'." && continue + REQUIRED_KERNEL_MODULES_EXPANDED+=" $ELEM" + done + done + cd - + pinfo "Expanded the list of $(echo "$REQUIRED_KERNEL_MODULES" | wc -w) required kernel modules to $(echo "$REQUIRED_KERNEL_MODULES_EXPANDED" | wc -w)" - for KERNEL_MODULE in ${REQUIRED_KERNEL_MODULES}; do + for KERNEL_MODULE in ${REQUIRED_KERNEL_MODULES_EXPANDED}; do local KERNEL_MODULE_PATH="${KERNEL_MODULES_DIR}/${KERNEL_MODULE}" if grep "^${KERNEL_MODULE}$" "${KERNEL_BUILD_DIR}/${KERNEL_MODULES_DIR}/modules.builtin" >/dev/null; then pdebug "Already built-in ${KERNEL_MODULE}." diff --git a/remote/modules/rsyslogd/data/etc/rsyslog.conf b/remote/modules/rsyslogd/data/etc/rsyslog.conf index e2548c99..3099f250 100644 --- a/remote/modules/rsyslogd/data/etc/rsyslog.conf +++ b/remote/modules/rsyslogd/data/etc/rsyslog.conf @@ -1,169 +1,85 @@ -## -## === When you're using remote logging, enable on-disk queues === -## === in rsyslog.d/remote.conf. When neccesary also set the === -## === SYSLOG_REQUIRES_NETWORK=yes in /etc/sysconfig/syslog, === -## === e.g. when rsyslog has to receive on a specific IP only. === -## -## Note, that when the MYSQL, PGSQL, GSSAPI, GnuTLS or SNMP modules -## (provided in separate rsyslog-module-* packages) are enabled, the -## configuration can't be used on a system with /usr on a remote -## filesystem, except on newer systems where initrd mounts /usr. -## [The modules are linked against libraries installed bellow of -## /usr thus also installed in /usr/lib*/rsyslog because of this.] -## - +# /etc/rsyslog.conf Configuration file for rsyslogd. # -# if you experience problems, check -# http://www.rsyslog.com/troubleshoot for assistance -# and report them at http://bugzilla.novell.com/ +# For more information see +# /usr/share/doc/rsyslog/html/rsyslog_conf.html +# +# First some standard logfiles. Log by facility. # -# since rsyslog v3: load input modules -# If you do not load inputs, nothing happens! - -# provides --MARK-- message capability (every 1 hour) -$ModLoad immark.so +$ModLoad imuxsock # provides support for local system logging +$ModLoad imklog # provides kernel logging support (previously done by rklogd) +$ModLoad immark $MarkMessagePeriod 3600 - -# provides support for local system logging (e.g. via logger command) -$ModLoad imuxsock.so - -# reduce dupplicate log messages (last message repeated n times) $RepeatedMsgReduction on -# kernel logging (may be also provided by /sbin/klogd) -# see also http://www.rsyslog.com/doc-imklog.html. -$ModLoad imklog.so -# set log level 1 (same as in /etc/sysconfig/syslog). -$klogConsoleLogLevel 1 - -# Use rsyslog native, rfc5424 conform log format as default -# ($ActionFileDefaultTemplate RSYSLOG_FileFormat). -# -# To change a single file to use obsolete BSD syslog format -# (rfc 3164, no high-precision timestamps), set the variable -# bellow or append ";RSYSLOG_FileFormat" to the filename. -# See -# http://www.rsyslog.com/doc/rsyslog_conf_templates.html -# for more informations. -# -#$ActionFileDefaultTemplate RSYSLOG_TraditionalFileFormat - -# -# Include config generated by /etc/init.d/syslog script -# using the SYSLOGD_ADDITIONAL_SOCKET* variables in the -# /etc/sysconfig/syslog file. -# -#$IncludeConfig /var/run/rsyslog/additional-log-sockets.conf - -# -# Include config files, that the admin provided? : -# -$IncludeConfig /etc/rsyslog.d/*.conf - -### -# print most important on tty10 and on the xconsole pipe -# -if ( \ - /* kernel up to warning except of firewall */ \ - ($syslogfacility-text == 'kern') and \ - ($syslogseverity <= 4 /* warning */ ) and not \ - ($msg contains 'IN=' and $msg contains 'OUT=') \ - ) or ( \ - /* up to errors except of facility authpriv */ \ - ($syslogseverity <= 3 /* errors */ ) and not \ - ($syslogfacility-text == 'authpriv') \ - ) \ -then /dev/tty10 -& |/dev/console +if ( \ + /* kernel up to warning except of firewall */ \ + ($syslogfacility-text == 'kern') and \ + ($syslogseverity <= 4 /* warning */ ) and not \ + ($msg contains 'IN=' and $msg contains 'OUT=') \ + ) or ( \ + /* up to errors except of facility authpriv */ \ + ($syslogseverity <= 3 /* errors */ ) and not \ + ($syslogfacility-text == 'authpriv') \ + ) \ +then /dev/tty10 +& |/dev/console -# Emergency messages to everyone logged on (wall) -*.emerg :omusrmsg:* - -# enable this, if you want that root is informed -# immediately, e.g. of logins -#*.alert root - +auth,authpriv.* /var/log/auth.log +*.*;auth,authpriv.none -/var/log/syslog +#cron.* /var/log/cron.log +daemon.* -/var/log/daemon.log +kern.* -/var/log/kern.log +lpr.* -/var/log/lpr.log +mail.* -/var/log/mail.log +user.* -/var/log/user.log # -# firewall messages into separate file and stop their further processing +# Logging for the mail system. Split it up so that +# it is easy to write scripts to parse these files. # -if ($syslogfacility-text == 'kern') and \ - ($msg contains 'IN=' and $msg contains 'OUT=') \ -then -/var/log/firewall -& ~ - - +mail.info -/var/log/mail.info +mail.warn -/var/log/mail.warn +mail.err /var/log/mail.err # -# acpid messages into separate file and stop their further processing +# Logging for INN news system # -# => all acpid messages for debuging (uncomment if needed): -#if ($programname == 'acpid' or $syslogtag == '[acpid]:') then \ -# -/var/log/acpid +news.crit /var/log/news/news.crit +news.err /var/log/news/news.err +news.notice -/var/log/news/news.notice # -# => up to notice (skip info and debug) -if ($programname == 'acpid' or $syslogtag == '[acpid]:') and \ - ($syslogseverity <= 5 /* notice */) \ -then -/var/log/acpid -& ~ - - +# Some `catch-all' logfiles. # -# NetworkManager into separate file and stop their further processing +*.=debug;\ + auth,authpriv.none;\ + news.none;mail.none -/var/log/debug +*.=info;*.=notice;*.=warn;\ + auth,authpriv.none;\ + cron,daemon.none;\ + mail,news.none -/var/log/messages # -if ($programname == 'NetworkManager') or \ - ($programname startswith 'nm-') \ -then -/var/log/NetworkManager -& ~ - - +# Emergencies are sent to everybody logged in. # -# email-messages -# -mail.* -/var/log/mail -mail.info -/var/log/mail.info -mail.warning -/var/log/mail.warn -mail.err /var/log/mail.err - - +*.emerg * # -# news-messages +# I like to have messages displayed on the console, but only on a virtual +# console I usually leave idle. # -news.crit -/var/log/news/news.crit -news.err -/var/log/news/news.err -news.notice -/var/log/news/news.notice -# enable this, if you want to keep all news messages -# in one file -#news.* -/var/log/news.all - - +#daemon,mail.*;\ +# news.=crit;news.=err;news.=notice;\ +# *.=debug;*.=info;\ +# *.=notice;*.=warn /dev/tty8 +# The named pipe /dev/xconsole is for the `xconsole' utility. To use it, +# you must invoke `xconsole' with the `-file' option: # -# Warnings in one file +# $ xconsole -file /dev/xconsole [...] # -*.=warning;*.=err -/var/log/warn -*.crit /var/log/warn - - +# NOTE: adjust the list below, or you'll go crazy if you have a reasonably +# busy site.. # -# the rest in one file -# -*.*;mail.none;news.none -/var/log/messages - - -# -# enable this, if you want to keep all messages -# in one file -#*.* -/var/log/allmessages - - -# -# Some foreign boot scripts require local7 -# -local0.*;local1.* -/var/log/localmessages -local2.*;local3.* -/var/log/localmessages -local4.*;local5.* -/var/log/localmessages -local6.*;local7.* -/var/log/localmessages - -### +daemon.*;mail.*;\ + news.err;\ + *.=debug;*.=info;\ + *.=notice;*.=warn |/dev/console diff --git a/remote/modules/rsyslogd/rsyslogd.conf b/remote/modules/rsyslogd/rsyslogd.conf index 35631c41..602a6050 100644 --- a/remote/modules/rsyslogd/rsyslogd.conf +++ b/remote/modules/rsyslogd/rsyslogd.conf @@ -1,4 +1,4 @@ REQUIRED_PACKAGES=" rsyslog" REQUIRED_BINARIES=" rsyslogd" +REQUIRED_FILES=" /etc/rsyslog.conf" REQUIRED_DIRECTORIES=" /usr/lib/rsyslog" -REQUIRED_SYSTEM_FILES=" /etc/rsyslog.conf" diff --git a/remote/rootfs/rootfs-stage31/data/init b/remote/rootfs/rootfs-stage31/data/init index a9c0435c..1e41012e 100755 --- a/remote/rootfs/rootfs-stage31/data/init +++ b/remote/rootfs/rootfs-stage31/data/init @@ -25,6 +25,14 @@ mount -n -t tmpfs -o 'mode=755' run "/run" echo "/sbin/mdev" > /proc/sys/kernel/hotplug # read graphic and network adaptor configuration (without proprietary drivers yet) +# TODO: must ugly hack ever... needs to be improved when we add prop drivers +for DRM in /lib/modules/*/kernel/drivers/gpu/drm/*.ko /lib/modules/*/kernel/drivers/gpu/drm/*/*.ko; do + DRM="$(basename "$DRM")" + DRM="${DRM%.ko}" + echo "Trying to load module $DRM" + modprobe "$DRM" +done + # read kernel command line for debugging switch DEBUG=0 read KCL < /proc/cmdline @@ -57,10 +65,6 @@ if [ "x$SPLASH" == "x1" -a "x$DEBUG" != "x1" ]; then plymouthd && plymouth show-splash fi -# still needed? -#echo "modprobe -qa usbhid hid-bright" >/etc/modprobe.base -#/bin/sh /etc/modprobe.base; mdev -s - # setup network nwif="eth0" # set up loopback networking @@ -73,37 +77,32 @@ ip link set dev $nwif up 2>/dev/null || { echo "No link for $nwif, dropping to # 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\ + 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 + # 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" + noipyet="yes" fi - -# load local file systems - in kernel now! :-) -#modprobe aufs -#modprobe squashfs - mkdir -p /dev/shm/union /dev/shm/uniontmp /rorootfs mount -n -t tmpfs none /dev/shm/uniontmp @@ -124,12 +123,13 @@ else fi echo "Building aufs..." +#mount -t overlayfs -o lowerdir=/rorootfs,upperdir=/dev/shm/uniontmp overlayfs /mnt mount -n -t aufs -o br:/dev/shm/uniontmp:/rorootfs=ro none /mnt mkdir -p /mnt/uniontmp /mnt/tmp mount -n --move /dev/shm/uniontmp /mnt/uniontmp # create udev rule for nic we booted from -echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="'$macaddr'", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"' > "/mnt/etc/udev/rules.d/70-net-boot-nic-name.rules" +[ -e "/mnt/etc/udev/rules.d/70-net-boot-nic-name.rules" ] && echo 'SUBSYSTEM=="net", ACTION=="add", DRIVERS=="?*", ATTR{address}=="'$macaddr'", ATTR{dev_id}=="0x0", ATTR{type}=="1", KERNEL=="eth*", NAME="eth0"' > "/mnt/etc/udev/rules.d/70-net-boot-nic-name.rules" for mnt in proc sys run ; do umount -n $mnt diff --git a/remote/rootfs/rootfs-stage31/rootfs-stage31.conf b/remote/rootfs/rootfs-stage31/rootfs-stage31.conf index 788ff8b3..b39895e2 100644 --- a/remote/rootfs/rootfs-stage31/rootfs-stage31.conf +++ b/remote/rootfs/rootfs-stage31/rootfs-stage31.conf @@ -4,22 +4,8 @@ REQUIRED_KERNEL_MODULES=" kernel/drivers/video/sis/sisfb.ko kernel/drivers/video/via/viafb.ko kernel/drivers/acpi/video.ko kernel/drivers/ssb/ssb.ko - kernel/drivers/gpu/drm/ttm/ttm.ko - kernel/drivers/gpu/drm/via/via.ko - kernel/drivers/gpu/drm/drm.ko - kernel/drivers/gpu/drm/tdfx/tdfx.ko - kernel/drivers/gpu/drm/nouveau/nouveau.ko - kernel/drivers/gpu/drm/savage/savage.ko - kernel/drivers/gpu/drm/radeon/radeon.ko - kernel/drivers/gpu/drm/drm_kms_helper.ko - kernel/drivers/gpu/drm/i810/i810.ko - kernel/drivers/gpu/drm/i2c/ch7006.ko - kernel/drivers/gpu/drm/i2c/sil164.ko - kernel/drivers/gpu/drm/sis/sis.ko - kernel/drivers/gpu/drm/mga/mga.ko - kernel/drivers/gpu/drm/i915/i915.ko - kernel/drivers/gpu/drm/r128/r128.ko - kernel/drivers/gpu/drm/vmwgfx/vmwgfx.ko + kernel/drivers/gpu/drm/drm*.ko + kernel/drivers/gpu/drm/*/*.ko kernel/drivers/i2c/algos/i2c-algo-bit.ko kernel/drivers/i2c/i2c-core.ko kernel/drivers/usb/usb-common.ko diff --git a/server/export_target b/server/export_target index e54a87bb..80ffd7ae 100755 --- a/server/export_target +++ b/server/export_target @@ -67,7 +67,9 @@ generate_stage32() { [ -e "${STAGE32_SQFS_DIR}/${TARGET}.sqfs" ] && rm "${STAGE32_SQFS_DIR}/${TARGET}.sqfs" pinfo "Writing '${TARGET}.sqfs' to '${STAGE32_SQFS_DIR}/${TARGET}.sqfs'" mksquashfs "${SERVER_BUILD_DIR}/${TARGET}" "${STAGE32_SQFS_DIR}/${TARGET}.sqfs" -comp xz -b 1M -no-recovery >&6 || perror "mksquashfs failed ($?)." - generate_initramfs "${SERVER_BOOT_DIR}/stage32_sqfs" "./mnt/${TARGET}.sqfs" "${SERVER_BOOT_DIR}/initramfs-${TARGET}" + generate_initramfs "${SERVER_BOOT_DIR}/stage32_sqfs" "./mnt/${TARGET}.sqfs" "${SERVER_BOOT_DIR}/initramfs-${TARGET}" + # cleanup + [ -d "${SERVER_BOOT_DIR}/stage32_sqfs" ] && rm -rf ${SERVER_BOOT_DIR}/stage32_sqfs } generate_stage31() { |
