diff options
author | Sebastian Schmelzer | 2008-03-05 21:14:09 +0100 |
---|---|---|
committer | Sebastian Schmelzer | 2008-03-05 21:14:09 +0100 |
commit | c581153f1ee49ab42e5598e8ec65844bc66664bd (patch) | |
tree | 4190e1d34fe4270904c9a0b461cdc6f1e7646e11 /initramfs | |
parent | minor modification in pixmap renamed to theme.xml (diff) | |
download | core-c581153f1ee49ab42e5598e8ec65844bc66664bd.tar.gz core-c581153f1ee49ab42e5598e8ec65844bc66664bd.tar.xz core-c581153f1ee49ab42e5598e8ec65844bc66664bd.zip |
fixed gdm startup
fixed too early getty startup
added files for ubuntu 8.04
git-svn-id: http://svn.openslx.org/svn/openslx/openslx/trunk@1606 95ad53e4-c205-0410-b2fa-d234c58c8868
Diffstat (limited to 'initramfs')
-rw-r--r-- | initramfs/distro-specs/ubuntu/config-7.10 | 2 | ||||
-rw-r--r-- | initramfs/distro-specs/ubuntu/config-8.04 | 45 | ||||
-rw-r--r-- | initramfs/distro-specs/ubuntu/functions-7.10 | 150 | ||||
-rw-r--r-- | initramfs/distro-specs/ubuntu/functions-8.04 | 166 |
4 files changed, 363 insertions, 0 deletions
diff --git a/initramfs/distro-specs/ubuntu/config-7.10 b/initramfs/distro-specs/ubuntu/config-7.10 index 3c44ce73..8a565ee6 100644 --- a/initramfs/distro-specs/ubuntu/config-7.10 +++ b/initramfs/distro-specs/ubuntu/config-7.10 @@ -34,6 +34,8 @@ # D_BOOTLOCAL - script for user specified stuff which should be started # during client bootup, path and file relative to /etc +# D_INITDEFAULT is obsolete with the change to upstart in 7.10 + D_ETCEXCL="*.old\n*-\n etc/autoinstall\nlogrotate*\nbootloader\n*~\n\ pptp.d\nisdn\nyouservers\nhardware/hwcfg*\n\ X11/xdm/pixmaps\ndhclient.script" diff --git a/initramfs/distro-specs/ubuntu/config-8.04 b/initramfs/distro-specs/ubuntu/config-8.04 new file mode 100644 index 00000000..8a565ee6 --- /dev/null +++ b/initramfs/distro-specs/ubuntu/config-8.04 @@ -0,0 +1,45 @@ +# Copyright (c) 2003 - 2007 - 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 +# +# Distro specific settings for Ubuntu Gutsy Gibbon (7.10) defaults are taken +# from config-default file + +# D_SYSCONFDIR - system wide configuration settings - /etc/sysconfig in SuSE +# and RedHat, /etc/default in Debian and Ubuntu +# 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 +# TempFS usage +# 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_XF86CONFFILE - name and location of XFree/Xorg config file, e.g. +# /etc/X11/xorg.conf or /etc/X11/XF86config, ... +# D_XORGBIN - name of XFree/Xorg server with absolute path +# D_XFONTPATH - path(es) where X11 fonts are installed (with trailing /*) +# D_DEFAULTCOUNTRY - localization (see common functions) +# D_HWMODTOIGNORE - hardware modules which should not tried to load (because +# already in kernel, nonexistent, ...) +# D_BOOTLOCAL - script for user specified stuff which should be started +# during client bootup, path and file relative to /etc + +# D_INITDEFAULT is obsolete with the change to upstart in 7.10 + +D_ETCEXCL="*.old\n*-\n etc/autoinstall\nlogrotate*\nbootloader\n*~\n\ +pptp.d\nisdn\nyouservers\nhardware/hwcfg*\n\ +X11/xdm/pixmaps\ndhclient.script" +D_RODIRSINRW="/etc/X11/xkb /var/lib/gconf /var/lib/dpkg /var/lib/aspell \ +/var/lib/pango /var/lib/defoma /var/cache/fontconfig" +D_INITSCRIPTS="mountkernfs.sh keyboard-setup mountdevsubfs.sh procps.sh \ +bootlogd hwclock.sh sudo console-setup $D_SPLASHY" diff --git a/initramfs/distro-specs/ubuntu/functions-7.10 b/initramfs/distro-specs/ubuntu/functions-7.10 index 1a4678ee..e5b73fd2 100644 --- a/initramfs/distro-specs/ubuntu/functions-7.10 +++ b/initramfs/distro-specs/ubuntu/functions-7.10 @@ -14,3 +14,153 @@ # initial ramfs - stage3) It may overwrite settings from the default config # file (/etc/functions) +# distro specific function called from servconfig script +config_distro () { + # add the halt link to the 0 and 6 runlevel directories + ln -sf ../init.d/halt /mnt/etc/rc0.d/S90halt + ln -sf ../init.d/reboot /mnt/etc/rc6.d/S90reboot + + # remove annoying udev rule set for changing eth interface + rm /mnt/etc/udev/rules.d/*persistent-net.rules >/dev/null 2>&1 + + # inittab is obsolete with the change to upstart in ubuntu 7.10, but to + # prevent missunderstandings with the blank inittab created by openslx init + # we'll write a comment.. + echo "# inittab is obsolete with the change to upstart in ubuntu 7.10" > /mnt/etc/inittab + + # fix getty bug + # (console login on tty1 is started too early) + sed -i "s/start on runlevel 2/start on stopped rc2/" /mnt/etc/event.d/tty1 +} + +# configure gdm as display manager +config_gdm () { +ln -sf ../${D_INITDIR}/gdm /mnt/etc/rc2.d/K20gdm +if [ "x$start_xdmcp" = "xgdm" ]; then + # configure fallback if no gdm binary present + if ! binfinder gdm; then + config_kdm + # error "" nonfatal + else + echo $(binfinder gdm) > /mnt/etc/X11/default-display-manager + fi +fi +ln -sf ../${D_INITDIR}/gdm /mnt/etc/rc2.d/S01gdm +# append gdm user; check for presence first +if ! grep "gdm:" /mnt/etc/passwd >/dev/null 2>&1; then + echo "gdm:x:113:" >>/mnt/etc/group + echo "gdm:x:106:113:Gnome Display Manager:/var/lib/gdm:/bin/false" \ + >>/mnt/etc/passwd +fi +testmkd /mnt/var/lib/gdm/.fontconfig +echo -e "\tchown gdm:gdm /var/lib/gdm/.fontconfig\n\tchown root:gdm \ +/var/lib/gdm\n" >>/mnt/etc/${D_INITDIR}/boot.slx +# fixme: check if a gdm.conf was provided via ConfTGZ +# [ -f /rootfs/etc/gdm/gdm.conf ??? ] || \ +echo -e "# /etc/gdm/gdm.conf - file generated by $0\n\ + +[daemon] +AutomaticLoginEnable=false +AutomaticLogin= +TimedLoginEnable=false +TimedLogin= +TimedLoginDelay=30 +Greeter=/usr/lib/gdm/gdmgreeter +DefaultPath=/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11:/usr/games +RootPath=/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11:/usr/games +User=gdm +Group=gdm +LogDir=/var/log/gdm +PidFile=/var/run/gdm.pid +PostLoginScriptDir=/etc/gdm/PostLogin/ +PreSessionScriptDir=/etc/gdm/PreSession/ +PostSessionScriptDir=/etc/gdm/PostSession/ +DisplayInitDir=/etc/gdm/Init +XKeepsCrashing=/etc/gdm/XKeepsCrashing +RebootCommand=/sbin/shutdown -r now \"Rebooted from gdm menu.\" +HaltCommand=/sbin/shutdown -h now \"Halted from gdm menu.\" +SuspendCommand=/usr/sbin/pmi action sleep +HibernateCommand=/usr/sbin/pmi action hibernate +ServAuthDir=/var/lib/gdm +BaseXsession=/etc/gdm/Xsession +SessionDesktopDir=/etc/X11/sessions/:/etc/dm/Sessions/:/usr/share/gdm/BuiltInSessions/:/usr/share/xsessions/ +DefaultSession=default.desktop +UserAuthDir= +UserAuthFBDir=/tmp +UserAuthFile=.Xauthority +StandardXServer=${D_XORGBIN} +Xnest=/usr/X11R6/bin/Xnest -br -audit 0 -name Xnest +FirstVT=7 +VTAllocation=true +SoundProgram=/usr/lib/gdmplay +[security] +AllowRoot=false +AllowRemoteRoot=false +AllowRemoteAutoLogin=false +RelaxPermissions=0 +CheckDirOwner=true +DisallowTCP=true +[xdmcp] +Enable=false +[gui] +GtkTheme=Human +AllowGtkThemeChange=true +GtkThemesToAllow=Human,HighContrast,HighContrastInverse,LowContrast +[greeter] +ConfigAvailable=false +Browser=true +MinimalUID=1000 +Exclude=bin,daemon,adm,lp,sync,shutdown,halt,mail,news,uucp,operator,nobody,gdm,postgres,pvm,rpm +IncludeAll=true +LocaleFile=/etc/gdm/locale.conf +SystemMenu=true +SecureSystemMenu=false +DefaultWelcome=true +DefaultRemoteWelcome=true +BackgroundColor=#523921 +UseCirclesInEntry=true +GraphicalTheme=Human +GraphicalThemeDir=/usr/share/gdm/themes/ +GraphicalThemeRand=false +SoundOnLogin=true +SoundOnLoginFile=/usr/share/sounds/question.wav +[chooser] +HostImageDir=/usr/share/hosts/ +Hosts= +Broadcast=true +Multicast=false +[debug] +Enable=false +[servers] +0=Standard +[server-Standard] +name=Standard server +command=/usr/X11R6/bin/X -br -audit 0 +flexible=true +[server-Terminal] +name=Terminal server +command=/usr/X11R6/bin/X -br -audit 0 -terminate +flexible=false +handled=false +[server-Chooser] +name=Chooser server +command=/usr/X11R6/bin/X -br -audit 0 +flexible=false +chooser=true + +[debug] +Enable=$debug" >/mnt/etc/gdm/gdm.conf +if [ "x$start_x" = "xindirect" ] ; then + # when X server consumes to much mem set X -terminate + echo -e "\n[servers]\n0=Terminal -audit 0 -indirect \ +$host_name\n\n\ +[server-Terminal]\nname=Terminal server\ncommand=/usr/X11R6/bin/X \ +-audit 0\n\ +flexible=true\nhandled=true\nchooser=true" >>/mnt/etc/gdm/gdm.conf +else + echo -e "\n[servers]\n0=Standard\n\n\ +[server-Standard]\nname=Standard server\ncommand=/usr/X11R6/bin/X\n\ +flexible=true\nhandled=true" >>/mnt/etc/gdm/gdm.conf +fi +} + diff --git a/initramfs/distro-specs/ubuntu/functions-8.04 b/initramfs/distro-specs/ubuntu/functions-8.04 new file mode 100644 index 00000000..e5b73fd2 --- /dev/null +++ b/initramfs/distro-specs/ubuntu/functions-8.04 @@ -0,0 +1,166 @@ +# 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 script for Ubuntu 7.04 to configure OpenSLX linux stateless +# clients (merged in stage2 with ubuntu/functions-default - and loaded within +# initial ramfs - stage3) It may overwrite settings from the default config +# file (/etc/functions) + +# distro specific function called from servconfig script +config_distro () { + # add the halt link to the 0 and 6 runlevel directories + ln -sf ../init.d/halt /mnt/etc/rc0.d/S90halt + ln -sf ../init.d/reboot /mnt/etc/rc6.d/S90reboot + + # remove annoying udev rule set for changing eth interface + rm /mnt/etc/udev/rules.d/*persistent-net.rules >/dev/null 2>&1 + + # inittab is obsolete with the change to upstart in ubuntu 7.10, but to + # prevent missunderstandings with the blank inittab created by openslx init + # we'll write a comment.. + echo "# inittab is obsolete with the change to upstart in ubuntu 7.10" > /mnt/etc/inittab + + # fix getty bug + # (console login on tty1 is started too early) + sed -i "s/start on runlevel 2/start on stopped rc2/" /mnt/etc/event.d/tty1 +} + +# configure gdm as display manager +config_gdm () { +ln -sf ../${D_INITDIR}/gdm /mnt/etc/rc2.d/K20gdm +if [ "x$start_xdmcp" = "xgdm" ]; then + # configure fallback if no gdm binary present + if ! binfinder gdm; then + config_kdm + # error "" nonfatal + else + echo $(binfinder gdm) > /mnt/etc/X11/default-display-manager + fi +fi +ln -sf ../${D_INITDIR}/gdm /mnt/etc/rc2.d/S01gdm +# append gdm user; check for presence first +if ! grep "gdm:" /mnt/etc/passwd >/dev/null 2>&1; then + echo "gdm:x:113:" >>/mnt/etc/group + echo "gdm:x:106:113:Gnome Display Manager:/var/lib/gdm:/bin/false" \ + >>/mnt/etc/passwd +fi +testmkd /mnt/var/lib/gdm/.fontconfig +echo -e "\tchown gdm:gdm /var/lib/gdm/.fontconfig\n\tchown root:gdm \ +/var/lib/gdm\n" >>/mnt/etc/${D_INITDIR}/boot.slx +# fixme: check if a gdm.conf was provided via ConfTGZ +# [ -f /rootfs/etc/gdm/gdm.conf ??? ] || \ +echo -e "# /etc/gdm/gdm.conf - file generated by $0\n\ + +[daemon] +AutomaticLoginEnable=false +AutomaticLogin= +TimedLoginEnable=false +TimedLogin= +TimedLoginDelay=30 +Greeter=/usr/lib/gdm/gdmgreeter +DefaultPath=/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11:/usr/games +RootPath=/usr/local/bin:/usr/local/sbin:/sbin:/usr/sbin:/bin:/usr/bin:/usr/bin/X11:/usr/games +User=gdm +Group=gdm +LogDir=/var/log/gdm +PidFile=/var/run/gdm.pid +PostLoginScriptDir=/etc/gdm/PostLogin/ +PreSessionScriptDir=/etc/gdm/PreSession/ +PostSessionScriptDir=/etc/gdm/PostSession/ +DisplayInitDir=/etc/gdm/Init +XKeepsCrashing=/etc/gdm/XKeepsCrashing +RebootCommand=/sbin/shutdown -r now \"Rebooted from gdm menu.\" +HaltCommand=/sbin/shutdown -h now \"Halted from gdm menu.\" +SuspendCommand=/usr/sbin/pmi action sleep +HibernateCommand=/usr/sbin/pmi action hibernate +ServAuthDir=/var/lib/gdm +BaseXsession=/etc/gdm/Xsession +SessionDesktopDir=/etc/X11/sessions/:/etc/dm/Sessions/:/usr/share/gdm/BuiltInSessions/:/usr/share/xsessions/ +DefaultSession=default.desktop +UserAuthDir= +UserAuthFBDir=/tmp +UserAuthFile=.Xauthority +StandardXServer=${D_XORGBIN} +Xnest=/usr/X11R6/bin/Xnest -br -audit 0 -name Xnest +FirstVT=7 +VTAllocation=true +SoundProgram=/usr/lib/gdmplay +[security] +AllowRoot=false +AllowRemoteRoot=false +AllowRemoteAutoLogin=false +RelaxPermissions=0 +CheckDirOwner=true +DisallowTCP=true +[xdmcp] +Enable=false +[gui] +GtkTheme=Human +AllowGtkThemeChange=true +GtkThemesToAllow=Human,HighContrast,HighContrastInverse,LowContrast +[greeter] +ConfigAvailable=false +Browser=true +MinimalUID=1000 +Exclude=bin,daemon,adm,lp,sync,shutdown,halt,mail,news,uucp,operator,nobody,gdm,postgres,pvm,rpm +IncludeAll=true +LocaleFile=/etc/gdm/locale.conf +SystemMenu=true +SecureSystemMenu=false +DefaultWelcome=true +DefaultRemoteWelcome=true +BackgroundColor=#523921 +UseCirclesInEntry=true +GraphicalTheme=Human +GraphicalThemeDir=/usr/share/gdm/themes/ +GraphicalThemeRand=false +SoundOnLogin=true +SoundOnLoginFile=/usr/share/sounds/question.wav +[chooser] +HostImageDir=/usr/share/hosts/ +Hosts= +Broadcast=true +Multicast=false +[debug] +Enable=false +[servers] +0=Standard +[server-Standard] +name=Standard server +command=/usr/X11R6/bin/X -br -audit 0 +flexible=true +[server-Terminal] +name=Terminal server +command=/usr/X11R6/bin/X -br -audit 0 -terminate +flexible=false +handled=false +[server-Chooser] +name=Chooser server +command=/usr/X11R6/bin/X -br -audit 0 +flexible=false +chooser=true + +[debug] +Enable=$debug" >/mnt/etc/gdm/gdm.conf +if [ "x$start_x" = "xindirect" ] ; then + # when X server consumes to much mem set X -terminate + echo -e "\n[servers]\n0=Terminal -audit 0 -indirect \ +$host_name\n\n\ +[server-Terminal]\nname=Terminal server\ncommand=/usr/X11R6/bin/X \ +-audit 0\n\ +flexible=true\nhandled=true\nchooser=true" >>/mnt/etc/gdm/gdm.conf +else + echo -e "\n[servers]\n0=Standard\n\n\ +[server-Standard]\nname=Standard server\ncommand=/usr/X11R6/bin/X\n\ +flexible=true\nhandled=true" >>/mnt/etc/gdm/gdm.conf +fi +} + |