summaryrefslogtreecommitdiffstats
path: root/live_update
blob: 02d46ea18e520413c5bb5ccfb7f7aeb760e193a6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#!/bin/sh

message=/usr/X11R6/bin/gmessage
[ -x $message ] || message=/usr/X11R6/bin/xmessage
[ -x $message ] || unset message

if [ "$UID" -ne 0 ]; then
    if [ -x "$message" ]; then
	case "$LANG" in
	    fr*) buttons="Arr�ter:0"
		 msg="Mise � jour en direct de Linux-Mandrake.

Vous devez �tre l'utilisateur root pour lancer cette application." ;;
	    *) buttons="Abort:0"
	       msg="Linux-Mandrake live upgrade.

You need to be root to start this program." ;;
	esac
	$message -buttons "$buttons" -print "$msg"
    else
	echo >&2 "You need to be root to start this program."
    fi
    exit 3
fi

distrib=`pwd`;
if [ ! -x "$distrib/Mandrake/mdkinst/usr/bin/perl-install/live_install" ]; then
    distrib="/mnt/cdrom"
fi
if [ ! -x "$distrib/Mandrake/mdkinst/usr/bin/perl-install/live_install" ]; then
    if [ -x "$message" ]; then
	case "$LANG" in
	    fr*) buttons="Arr�ter:0"
		 msg="Mise � jour en direct de Linux-Mandrake.

Impossible de trouver le C�d�rom d'installation de Linux-Mandrake dans le premier lecteur." ;;
	    *) buttons="Abort:0"
	       msg="Linux-Mandrake live upgrade.

Unable to find Linux-Mandrake Installation Cd-Rom in the first drive." ;;
	esac
	$message -buttons "$buttons" -print "$msg"
    else
	echo >&2 "Unable to find Linux-Mandrake Installation Cd-Rom in the first drive."
    fi
    exit 2
fi

if [ -x "$message" ]; then
    case "$LANG" in
	fr*) buttons="Mise � jour:0,Annuler:1"
	     msg="Mise � jour en direct de Linux-Mandrake.

Appuyez sur \"Mise � jour\" pour lancer la mise � jour de votre syst�me,
cela prendra quelques minutes avant que l'�cran de DrakX apparaisse.

Appuyez sur \"Annuler\" pour ne pas mettre � jour votre syst�me de cette mani�re." ;;
	*) buttons="Upgrade:0,Cancel:1"
	   msg="Linux-Mandrake live upgrade.

Press \"Upgrade\" to start live upgrade on your system, note this will
take some time to prepare the system before DrakX screen appears.

Press \"Cancel\" to avoid upgrading your system this way." ;;
    esac
    default=`echo $buttons | cut -d: -f1`
    $message -buttons "$buttons" -default "$default" -print "$msg"
    [ $? -ne 0 ] && exit 1
else
    echo >&2 "Press ENTER to start live upgrade on your system, note this will
take some time to prepare the system before DrakX screen appears.

Press CTRL-C to avoid upgrading your system this way."
fi

cd "$distrib/Mandrake/mdkinst/usr/bin/perl-install" && exec ./live_install
exit 2