# Copyright (c) 2003 - 2006 - RZ Uni Freiburg # Copyright (c) 2006, 2007 - OpenSLX GmbH # # This program/file 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 under http://openslx.org # # Configuration functions for SuSE 10.1 which differ from functions defined # in general SuSE base definitions ... General changes should be done there, # version specific changes for the 10.1 go here. # afs client # configure afs client config_afs () { if [ "x$start_afs" = "xyes" ] ; then if [ -f /mnt/etc/init.d/openafs-client ] ; then test -d /mnt/afs || error "${df_errafsd}" testmkd /mnt/var/cache/openafs rllinker "openafs-client" 15 6 # echo -e "# /etc/sysconfig/afs-client - file generated by \ #$0:\n#\t$date\n" >/etc/sysconfig/afs-client.new; # sed -e "s,THIS_CELL_SERVER.*,THIS_CELL_SERVER=\"$cell_serv\"," \ # -e "s,PREFERREDSERVERS.*,PREFERREDSERVERS=\"$cell_serv\"," \ # -e "s,THIS_CELL.*,THIS_CELL=\"$this_cell\"," \ # -e "s,MEMCACHE.*,MEMCACHE=\"yes\"," \ # /etc/sysconfig/afs-client >> \ # /etc/sysconfig/afs-client.new # mv /etc/sysconfig/afs-client.new /etc/sysconfig/afs-client else error "${df_errafsn}" nonfatal fi fi } # set up keytable (function run in hwautocfg) # kbd runlevel link is in the list of initial runlevel scripts (see # config-10.1 file) keytable () { # remove unneeded components from the startscript sed -e "/wanted keytable/,/^fi$/d;/load usb drivers/,/^esac$/d" \ -i /mnt/etc/${D_INITDIR}/kbd sed -e "s,KEYTABLE=.*,KEYTABLE=\"${KEYTABLE}\"," \ -i /mnt/etc/${D_SYSCONFDIR}/keyboard } # consolefont and language (function run in hwautocfg) consolefont () { sed -e "s,RC_LANG=.*,RC_LANG=\"${LANG}\" # added in initrd," \ -i /mnt/etc/${D_SYSCONFDIR}/language } # check the glx and tvout stuff and configure it checkgraphix () { # test if unionfs case "${XMODULE}" in radeon) # IGP is not supported with fglrx driver (at least not in some versions) # comment if it works properly ... strinfile " IGP" /tmp/hwsetup.info && exit # check ${XDESC}/ hwsetup.info device string in Cards file and then # for needed components # not all radeon cards are properly supported by fglrx, so the decision on # module might be done via hwsetup!? test -e /mnt/lib/modules/${KERNEL}/kernel/drivers/char/drm/fglrx.ko \ && test -e /mnt/usr/X11R6/lib/modules/drivers/fglrx_drv.* && { XMODULE=fglrx # it only works for UnionFS enabled systems ln -sf /usr/X11R6/lib/libGL.so.1.2 \ /mnt/usr/X11R6/lib/libGL.so.1 2>/dev/null } # check whether to enable tvout. option could be set in machine-setup if [ -n "$tvout" ] && [ "$tvout" != "no" -a "$tvout" != "NO" ] ; then [ "$tvout" = "yes" ] && tvout="PAL-B" TVOUT='\tOption\t\t"TVFormat" "'$tvout TVOUT=$TVOUT'"\n\tOption\t\t"DesktopSetup" "horizontal"' fi ;; nv) # check for needed components (kernel and libraries) test -e /mnt/lib/modules/${KERNEL}/kernel/drivers/char/drm/nvidia.ko \ && test -e /mnt/usr/X11R6/lib/modules/drivers/nvidia_drv.* && { gllib=$(ls /mnt/usr/X11R6/lib/libGL.so.1.0.* 2>/dev/null|sed -n "1p") if [ -n "$gllib" ] ; then ln -sf ${gllib#/mnt} /mnt/usr/X11R6/lib/libGL.so.1 2>/dev/null # same for GLcore lib gllib=$(ls /mnt/usr/X11R6/lib/libGLcore.so.1.0.* 2>/dev/null|\ sed -n "1p") ln -sf ${gllib#/mnt} /mnt/usr/X11R6/lib/libGLcore.so.1 2>/dev/null \ || fail=1 # load server modules (trick put the path before the official one) testmkd /mnt/etc/X11/modules ln -sf /usr/X11R6/lib/modules/updates/extensions/libglx.so \ /mnt/etc/X11/modules/libglx.so || fail=1 ln -sf /usr/X11R6/lib/modules/updates/drivers/nvidia_drv.so \ /mnt/etc/X11/modules/nvidia_drv.so || fail=1 [ -z $fail ] && XMODULE=nvidia # ensure proper permissions for nvidia devices - does not work for some reason #echo -e "# nvidia stuff added by $0 in InitRamFS\nKERNEL==\"nvidia*|nvidiactl*\",\ #GROUP=\"video\",MODE=\"0666\"" > /mnt/etc/udev/rules.d/10-nvidia-devperms.rules fi } ;; esac } # secure shell service config_sshd () { if [ "x$start_sshd" = "xyes" ] ; then if [ -f /mnt/etc/${D_INITDIR}/sshd ] ; then testmkd /mnt/var/lib/sshd testmkd /mnt/var/lib/empty if ! strinfile "sshd:" /mnt/etc/passwd ; then echo -e "sshd:x:71:65::/var/run/sshd:/bin/false" \ >>/mnt/etc/passwd echo -e "sshd:!:13099:0:99999:7:::" >>/mnt/etc/shadow fi rllinker "sshd" 25 10 else error "$df_errsshd" nonfatal fi fi } # Xorg variable settings. Lots of stuff changes for newer Xorg servers displayvars () { synapticsdrv="/usr/X11R6/lib/modules/input/synaptics_drv.o" }