diff options
author | Chris Gianelloni <wolf31o2@gentoo.org> | 2006-03-13 17:00:21 +0000 |
---|---|---|
committer | Chris Gianelloni <wolf31o2@gentoo.org> | 2006-03-13 17:00:21 +0000 |
commit | 9db22f722c9d88f0b3a37ef70c466ac7a2605f3c (patch) | |
tree | 8b896049f96be4c94a2a6653573c35b014d74708 | |
parent | look for minors out of order instead of disk position (diff) | |
download | gli-9db22f722c9d88f0b3a37ef70c466ac7a2605f3c.tar.gz gli-9db22f722c9d88f0b3a37ef70c466ac7a2605f3c.tar.bz2 gli-9db22f722c9d88f0b3a37ef70c466ac7a2605f3c.zip |
Added bash scripts, icons, and desktop entries from the ebuild to make my life easier.
git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/gli/trunk@1362 f8877401-5920-0410-a79b-8e2d7e04ca0d
-rw-r--r-- | ChangeLog | 12 | ||||
-rwxr-xr-x | bin/installer | 108 | ||||
-rwxr-xr-x | bin/installer-dialog | 8 | ||||
-rwxr-xr-x | bin/installer-gtk | 9 | ||||
-rw-r--r-- | docs/gli-dialog.png | bin | 0 -> 3783 bytes | |||
-rw-r--r-- | docs/gli.png | bin | 0 -> 3266 bytes | |||
-rw-r--r-- | src/misc/installer-dialog.desktop | 12 | ||||
-rw-r--r-- | src/misc/installer-faq.desktop | 12 | ||||
-rw-r--r-- | src/misc/installer-gtk.desktop | 11 |
9 files changed, 169 insertions, 3 deletions
@@ -1,7 +1,13 @@ # ChangeLog for Gentoo Linux Installer -# Copyright 2005-2005 Gentoo Technologies, Inc. - -# $Header: /var/cvsroot/gentoo/src/installer/ChangeLog,v 1.619 2006/03/10 23:50:58 agaffney Exp $ +# Copyright 2005-2006 Gentoo Foundation; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo/src/installer/ChangeLog,v 1.620 2006/03/13 17:00:21 wolf31o2 Exp $ + + 13 Mar 2006; Chris Gianelloni <wolf31o2@gentoo.org> +bin/installer, + +bin/installer-dialog, +bin/installer-gtk, +docs/gli.png, + +docs/gli-dialog.png, +src/misc/installer-dialog.desktop, + +src/misc/installer-faq.desktop, +src/misc/installer-gtk.desktop: + Added bash scripts, icons, and desktop entries from the ebuild to make my + life easier. 10 Mar 2006; Andrew Gaffney <agaffney@gentoo.org> src/GLIStorageDevice.py: diff --git a/bin/installer b/bin/installer new file mode 100755 index 0000000..34a5f59 --- /dev/null +++ b/bin/installer @@ -0,0 +1,108 @@ +#!/bin/bash +# +# $Header: /var/cvsroot/gentoo/src/installer/bin/installer,v 1.1 2006/03/13 17:00:21 wolf31o2 Exp $ +# +# This is the installer script that we will use to determine whether or not +# we are running in X or as root. A good portion of this script was ripped +# from the loki_setup setup.sh script, as it already did most of what I was +# looking to do. + +installer_root=/opt/installer + +# Allow X +xhost + 2>/dev/null + +# patching utf-8 locales +if test ! ${UTF8FIX} ; then +LANG=`echo ${LANG} | sed 's/[\@\.].*$//'` +fi + +# Go to the proper setup directory (if not already there) +#cd `dirname $0` +cd $installer_root/bin + +# call installer with -auth when ran through su/xsu/sudo +auth=0 +if [ "$1" = "-auth" ]; then + auth=1 + shift +fi + +# Find the installation program +# try_run INSTALLER_NAME [PARAMETERS_PASSED] +# INSTALLER_NAME: installer-gtk or installer-dialog +# PARAMETERS_PASSED: additional arguments passed to the setup script +try_run() { + setup=$1 + shift + + failed=0 + "$setup" "$@" 2>/dev/null + failed="$?" + return "$failed" +} + +if [ "$auth" -eq 0 ]; then + GOT_ROOT=`id -u` + if [ "$GOT_ROOT" != "0" ]; then + # first we try sudo + try_run /usr/bin/sudo env DISPLAY=":0.0" su -c "$installer_root/bin/installer -auth" + status="$?" + if [ "$status" -eq 0 ]; then + exit 0 + elif [ "$status" -eq 1 ]; then + try_run /usr/bin/gnomesu -u root -c "sh $installer_root/bin/installer -auth" + status="$?" + # If try_run successfully executed gnomesu, it will return gnomesu's + # exit code. + if [ "$status" -eq 0 ]; then + exit 0 + elif [ "$status" -eq 1 ]; then + try_run /usr/bin/xsu -e -a -u root -c "sh $installer_root/bin/installer -auth" + status="$?" + # xsu returns 2 if ran and cancelled (i.e. the user 'doesn't + # want' to auth). it will return 0 if the command was executed + # correctly + # summing up, if we get 1, something failed + if [ "$status" -eq 0 ]; then + exit 0 + elif [ "$status" -eq 1 ]; then + # xsu wasn't found, or failed to run + # if xsu actually ran and the auth was cancelled, + # $status is 2 + echo "You need to run this installation as the super user." + echo "Please enter the root password." + try_run /bin/su root -c "export DISPLAY=$DISPLAY;sh $installer_root/bin/installer -auth" + status="$?" + if [ "$status" -eq 0 ]; then + # the auth command was properly executed + exit 0 + else + exit 1 + fi + elif [ "$status" -eq 3 ]; then + # the auth failed or was canceled + # we don't want to even start the setup if not root + echo "Please run this installation as the super user" + exit 1 + fi + elif [ "$status" -eq 3 ]; then + echo "Please run this installation as the super user" + exit 1 + fi + fi + fi +fi + +# Try to run the installer +try_run /usr/bin/installer-gtk $args $* +status=$? +if [ $status -eq 1 ]; then + try_run /usr/bin/installer-dialog $args $* || { + if [ $status -ne 2 ]; then + echo "The setup program seems to have failed" + fi + status=1 + } +fi +exit $status diff --git a/bin/installer-dialog b/bin/installer-dialog new file mode 100755 index 0000000..e6bbc7d --- /dev/null +++ b/bin/installer-dialog @@ -0,0 +1,8 @@ +#!/bin/bash + +INSTALL_DIR=/opt/installer +export PYTHONPATH="${INSTALL_DIR}" + +cd ${INSTALL_DIR}/fe/dialog +./gli-dialog.py + diff --git a/bin/installer-gtk b/bin/installer-gtk new file mode 100755 index 0000000..8c1ce25 --- /dev/null +++ b/bin/installer-gtk @@ -0,0 +1,9 @@ +#!/bin/bash + +INSTALL_DIR=/opt/installer +export PYTHONPATH="${INSTALL_DIR}" + +cd ${INSTALL_DIR}/fe/gtk +./gtkfe.py + + diff --git a/docs/gli-dialog.png b/docs/gli-dialog.png Binary files differnew file mode 100644 index 0000000..d89d5cb --- /dev/null +++ b/docs/gli-dialog.png diff --git a/docs/gli.png b/docs/gli.png Binary files differnew file mode 100644 index 0000000..c9ae742 --- /dev/null +++ b/docs/gli.png diff --git a/src/misc/installer-dialog.desktop b/src/misc/installer-dialog.desktop new file mode 100644 index 0000000..f35f1d8 --- /dev/null +++ b/src/misc/installer-dialog.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Exec=installer-dialog +TryExec= +X-GNOME-DocPath= +Terminal=true +Name=Gentoo Linux Installer (Command Line) +GenericName=Gentoo Linux Installer (Command Line) +Comment=This link starts the command line version of the Gentoo Linux Installer in a terminal. +Icon=gli-dialog.png diff --git a/src/misc/installer-faq.desktop b/src/misc/installer-faq.desktop new file mode 100644 index 0000000..df2e7dc --- /dev/null +++ b/src/misc/installer-faq.desktop @@ -0,0 +1,12 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Link +URL=http://www.gentoo.org/proj/en/releng/installer/faq.xml +TryExec= +X-GNOME-DocPath= +Terminal=false +Name=Gentoo Linux Installer FAQ +GenericName=Gentoo Linux Installer FAQ +Comment=This is a link to the Gentoo Linux Installer Frequently Asked Questions. Please click here before filing any bugs or asking questions on IRC or the mailing list. +Icon=gedit-icon.png diff --git a/src/misc/installer-gtk.desktop b/src/misc/installer-gtk.desktop new file mode 100644 index 0000000..4eb4323 --- /dev/null +++ b/src/misc/installer-gtk.desktop @@ -0,0 +1,11 @@ +[Desktop Entry] +Encoding=UTF-8 +Version=1.0 +Type=Application +Exec=installer-gtk +TryExec= +X-GNOME-DocPath= +Name=Gentoo Linux Installer (GTK+) +GenericName=Gentoo Linux Installer (GTK+) +Comment=This link starts the GTK+ version of the Gentoo Linux Installer. +Icon=gli.png |