summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMartin Sivak <msivak@redhat.com>2009-07-13 13:30:25 +0200
committerMartin Sivak <msivak@redhat.com>2009-07-13 13:30:25 +0200
commitf834483d7b3ba8e6bdfe8a49903956a0c80a8b91 (patch)
tree9612ed8f2fbacad77d6b9d3ca5d1c5204bb9c474
parentacc237023ff6e332b987a1d9a820cd7d8daa7651 (diff)
downloadfirstaidkit-f834483d7b3ba8e6bdfe8a49903956a0c80a8b91.tar.gz
firstaidkit-f834483d7b3ba8e6bdfe8a49903956a0c80a8b91.tar.xz
firstaidkit-f834483d7b3ba8e6bdfe8a49903956a0c80a8b91.zip
Add First Aid Kit Quickstart script
-rwxr-xr-xfirstaidkit-qs42
-rw-r--r--firstaidkit.spec8
-rw-r--r--setup.py4
3 files changed, 49 insertions, 5 deletions
diff --git a/firstaidkit-qs b/firstaidkit-qs
new file mode 100755
index 0000000..d2c8b14
--- /dev/null
+++ b/firstaidkit-qs
@@ -0,0 +1,42 @@
+#!/bin/sh
+
+function pause()
+{
+ echo "Press enter to continue"
+ read a
+}
+
+if [ "$DISPLAY" == "" ]; then
+ DIALOG="dialog"
+else
+ DIALOG="xdialog"
+fi
+
+OPTION=""
+TMPFILE="/tmp/$0-$$.item"
+MENU="\
+shell Start shell\
+fakd Run diagnostic\
+reboot Reboot\
+"
+
+WIDTH="30"
+HEIGHT="12"
+MENUHEIGHT="8"
+
+while [ "x$OPTION" != "x" ]; do
+ $DIALOG --menu $HEIGHT $WIDTH $MENUHEIGHT $MENU 2>$TMPFILE
+ OPTION=$(cat $TMPFILE)
+
+ if [ "x$OPTION" == "xshell" ]; then
+ echo "Starting shell..."
+ bash
+ elif [ "x$OPTION" == "xfakd" ]; then
+ echo "Running diagnostic..."
+ firstaidkit -a
+ pause
+ elif [ "x$OPTION" == "xreboot" ]; then
+ reboot
+ fi
+
+done
diff --git a/firstaidkit.spec b/firstaidkit.spec
index c5b10c9..79a131e 100644
--- a/firstaidkit.spec
+++ b/firstaidkit.spec
@@ -3,7 +3,7 @@
%define _unpackaged_files_terminate_build 0
Name: firstaidkit
-Version: 0.2.2
+Version: 0.2.3
Release: 1%{?dist}
Summary: System Rescue Tool
@@ -18,6 +18,7 @@ BuildRequires: desktop-file-utils
BuildRequires: python-devel
BuildRequires: python-setuptools-devel
BuildArch: noarch
+Requires: dialog
%description
A tool that automates simple and common system recovery tasks.
@@ -38,7 +39,7 @@ Summary: All firstaidkit plugins, and the gui
Requires: %{name} = %{version}-%{release}
Requires: %{name}-plugin-passwd
Requires: %{name}-plugin-xserver
-%ifnarch s390 s390x ppc64 ppc
+%ifnarch s390 s390x ppc64 ppc sparc
Requires: %{name}-plugin-grub
%endif
Requires: %{name}-gui
@@ -89,7 +90,7 @@ Requires: %{name} = %{version}-%{release}
Requires: dbus-python
Requires: grub
Requires: pyparted
-ExcludeArch: ppc ppc64 s390 s390x
+ExcludeArch: ppc ppc64 s390 s390x sparc
%description plugin-grub
This FirstAidKit plugin automates the recovery from the GRUB bootloader problems.
@@ -185,6 +186,7 @@ desktop-file-install --vendor="fedora" --dir=${RPM_BUILD_ROOT}%{_datadir}/applic
%{python_sitelib}/pyfirstaidkit
%{python_sitelib}/%{name}-%{version}-py?.?.egg-info
%{_bindir}/firstaidkit
+%{_bindir}/firstaidkit-qs
%dir %{_bindir}/firstaidkit
%{_bindir}/firstaidkitrevert
%config(noreplace) %{_sysconfdir}/firstaidkit/firstaidkit.conf
diff --git a/setup.py b/setup.py
index 5c64766..a063056 100644
--- a/setup.py
+++ b/setup.py
@@ -1,13 +1,13 @@
from setuptools import setup
setup(name='firstaidkit',
- version='0.2.2',
+ version='0.2.3',
description='System Rescue Tool',
author='Martin Sivak / Joel Andres Granados',
author_email='msivak@redhat.com / jgranado@redhat.com',
url='http://fedorahosted.org/firstaidkit',
license='GPLv2+',
packages = ['pyfirstaidkit', 'pyfirstaidkit/utils'],
- scripts = ['firstaidkit', 'firstaidkitrevert']
+ scripts = ['firstaidkit', 'firstaidkitrevert', 'firstaidkit-qs']
)