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 /remote | |
| 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
Diffstat (limited to 'remote')
| -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 |
4 files changed, 96 insertions, 194 deletions
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 |
