Update of /cvsroot/morphix/scripts-main/kde32/init.d In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11052 Added Files: X11-shutdown X11-start X11-wait basemodule console drm groups hostname shutdown sudoers Log Message: * initial release --- NEW FILE: X11-shutdown --- # X-server shut down . /morphix/include.sh for i in $XSERVER; do killall -TERM $i 2> /dev/null && echo "X-Server shut down." && break done --- NEW FILE: X11-start --- # Prepare and start X11 . /morphix/include.sh if [ -z "$(getbootparam wm)" ]; then WINDOWMANAGER=/etc/gdm/Sessions/KDE else WINDOWMANAGER="$(getbootparam wm)" fi if [ -e /tmp/background.png ]; then BGIMAGE=/tmp/background.png else BGIMAGE=/morphix/background.png fi echo "xsetbg -fullscreen $BGIMAGE && idesk &" >> /etc/X11/xinit/xinitrc echo "xsetbg -fullscreen $BGIMAGE && idesk &" >> /home/$USER/.xinitrc echo "xsetbg -fullscreen $BGIMAGE && idesk &" >> /home/$USER/.xsession echo "exec $WINDOWMANAGER" >> /etc/X11/xinit/xinitrc echo "exec $WINDOWMANAGER" >> /home/$USER/.xinitrc echo "exec $WINDOWMANAGER" >> /home/$USER/.xsession echo "starting x11" su -c "exec /usr/bin/X11/startx" - $USER --- NEW FILE: X11-wait --- # wait until X is locked . /morphix/include.sh for i in 1 2 3 4 5 6 7 8 9 10 do if [ -f /tmp/.X0-lock ]; then break sleep 1 fi done --- NEW FILE: basemodule --- # load the config's generated by our basemodule . /morphix/include.sh XMODULE="" [ -f /etc/sysconfig/xserver ] && . /etc/sysconfig/xserver [ -f /etc/sysconfig/morphix-all ] && . /etc/sysconfig/morphix-all [ -f /etc/sysconfig/keyboard ] && . /etc/sysconfig/keyboard [ -f /etc/sysconfig/i18n ] && . /etc/sysconfig/i18n export LANG COUNTRY CHARSET [ -f /etc/sysconfig/keyboard ] && . /etc/sysconfig/keyboard # Set default keyboard before interactive setup [ -n "$KEYTABLE" ] && loadkeys -q $KEYTABLE [ -n "$CONSOLEFONT" ] && consolechars -f $CONSOLEFONT echo "MainModule loaded" --- NEW FILE: console --- # Setting up our handy-dandy console-shells, thanks to popular demand... # ripped from Knopper's knoppix-autoconfig . /morphix/include.sh while true; do /bin/bash >/dev/tty2 2>&1 </dev/tty2; done & while true; do /bin/bash >/dev/tty3 2>&1 </dev/tty3; done & while true; do /bin/bash >/dev/tty4 2>&1 </dev/tty4; done & while true; do /bin/bash >/dev/tty5 2>&1 </dev/tty5; done & while true; do /bin/bash >/dev/tty6 2>&1 </dev/tty6; done & --- NEW FILE: drm --- # Try to find and load a drm module for this graphics card # ripped from Knopper's xsession . /morphix/include.sh if [ -n "$XMODULE" ]; then for i in /lib/modules/*/kernel/drivers/char/drm/*; do case "$i" in *$XMODULE*) modprobe $XMODULE;; esac done fi --- NEW FILE: groups --- # We want to add user to some special groups ... just for fun of it # (and because it was requested for GNUstep livecd) . /morphix/include.sh GROUPS="cdrom audio video" for group in $GROUPS do adduser $USER $GROUP done --- NEW FILE: hostname --- # Morphix hijacks hostname so we set it again here :) . /morphix/include.sh if [ "$USER" != "morph" ]; then echo "Setting hostname to $USER" hostname $USER fi --- NEW FILE: shutdown --- # Everything is finished .. should reboot like Knoppix does . /morphix/include.sh echo "Rebooting... (disabled, just to be sure, for now)" echo "Use reboot or halt to shutdown your computer" #exec reboot --- NEW FILE: sudoers --- # Set sudo if it is installed and not already configured for current user . /morphix/include.sh if [ -e /etc/sudoers ]; then if grep -q $USER /etc/sudoers then echo -e "\n $USER ALL=NOPASSWD: ALL \n" >> /etc/sudoers fi fi |