home *** CD-ROM | disk | FTP | other *** search
- #!/bin/bash
- #/----------------------------------------------------------------------\
- #| |
- #| __ __ ____ _____ ____ |
- #| \ \ / /_ _/ ___|_ _|___ \ |
- #| \ V / _` \___ \ | | __) | |
- #| | | (_| |___) || | / __/ |
- #| |_|\__,_|____/ |_| |_____| |
- #| |
- #| core system |
- #| (C) SuSE GmbH |
- #\----------------------------------------------------------------------/
- #
- # File: yast2
- #
- # Authors: Mathias Kettner <kettner@suse.de>
- # Klaus Kaempf <kkaempf@suse.de>
- # Maintainer: Klaus Kaempf <kkaempf@suse.de>
- #
- #
- # This script is called, when the user just types in 'yast2'. It starts
- # the qt user interface in case the DISPLAY variable is set and other-
- # wise the ncurses. It starts then the module 'menu' which implements
- # the configuration and administration menu.
- #
- #/-*/
- if [ $UID == 0 ] ; then
- if [ -z "$DISPLAY" ] ; then
- y2ncurses menu ncurses -T
- else
- y2qt menu qt -T -geometry 640x480 -style=platinum
- fi
- else
- if [ -n "$DISPLAY" ] ; then
- xhost +`hostname` > /dev/null 2>&1
- fi
- # su asks "password", this will output "root password"
- echo -n "root "
- if [ -z "$DISPLAY" ] ; then
- su -c 'PATH=/sbin:/usr/sbin:$PATH y2ncurses menu ncurses -T'
- else
- su -c 'PATH=/sbin:/usr/sbin:$PATH y2qt menu qt -T -geometry 640x480 -style=platinum'
- fi
- fi
-