Last change
on this file since 3422 was 355, checked in by bcornec, 19 years ago |
Adds everything related to mondo cd creation
|
-
Property svn:executable
set to
*
|
File size:
1.2 KB
|
Line | |
---|
1 | #!/bin/sh
|
---|
2 | #
|
---|
3 | # Autorun script for mondo installer CD
|
---|
4 | # - Hugo Rabson, 2003/04/28
|
---|
5 | #
|
---|
6 | # Based on autorun script for the Ark Development Suite
|
---|
7 | # Copyright (c) 2002 Bernhard Rosenkraenzer <bero@arklinux.org>
|
---|
8 | #
|
---|
9 |
|
---|
10 |
|
---|
11 |
|
---|
12 |
|
---|
13 | InBkgd() {
|
---|
14 | cd /
|
---|
15 | sleep 1
|
---|
16 | umount $1 &> /dev/null
|
---|
17 | eject $2 &> /dev/null
|
---|
18 | }
|
---|
19 |
|
---|
20 |
|
---|
21 | run_command_as_root() {
|
---|
22 | local command fnam subcom
|
---|
23 |
|
---|
24 | subcom="$1"
|
---|
25 | command="xterm -e $subcom"
|
---|
26 | if which kdesux &> /dev/null ; then
|
---|
27 | kdesu +sb -c "$command"
|
---|
28 | else
|
---|
29 | fnam=/tmp/$$.$RANDOM.sh
|
---|
30 | echo -en "echo -en \"\
|
---|
31 | To install Mondo, you need to be root.\n\
|
---|
32 | Please enter root's password now to proceed,\n\
|
---|
33 | or press <Ctrl>-C to abort installation.\n\"\n\
|
---|
34 | su - -c $subcom\n" > $fnam
|
---|
35 | chmod +x $fnam
|
---|
36 | xterm -e "$fnam"
|
---|
37 | rm -f $fnam
|
---|
38 | fi
|
---|
39 | }
|
---|
40 |
|
---|
41 |
|
---|
42 | # ------------------------- main -------------------------
|
---|
43 |
|
---|
44 | if [ -d "`dirname $0`" ]; then
|
---|
45 | cd "`dirname $0`"
|
---|
46 | fi
|
---|
47 |
|
---|
48 | q=`pwd`
|
---|
49 | r=`mount | grep $q | tr -s ' ' '\t' | cut -f1`
|
---|
50 |
|
---|
51 | ps ax | grep mondoarchive | grep -v grep && exit 0
|
---|
52 | ps ax | grep mondorestore | grep -v grep && exit 0
|
---|
53 |
|
---|
54 | mr=/setup
|
---|
55 | #mr=`which mondorestore`
|
---|
56 | #if [ "$mr" ] && [ -x "$mr" ] ; then
|
---|
57 | # kdesu +sb -c "xterm -e $mr"
|
---|
58 | #else
|
---|
59 | #fi
|
---|
60 |
|
---|
61 | subcom=`pwd`$mr
|
---|
62 | run_command_as_root "$subcom"
|
---|
63 | InBkgd $q $r &
|
---|
64 | exit $?
|
---|
Note:
See
TracBrowser
for help on using the repository browser.