summaryrefslogtreecommitdiffstats
path: root/liveinst/liveinst.sh
blob: 8b7c244d4f75cc58970238b715f8c6aac27a7431 (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
#!/bin/sh
#
# Simple script to kick off an install from a live CD
#

if [ -z "$LIVE_BLOCK" ]; then
    LIVE_BLOCK="/dev/live-osimg"
fi

if [ ! -b $LIVE_BLOCK ]; then
  zenity --error --title="Not a Live image" --text "Can't do live image installation unless running from a live image"
  exit 1
fi

# load modules that would get loaded by the loader... (#230945)
for i in md raid0 raid1 raid5 raid6 raid456 raid10 fat msdos lock_nolock gfs2 reiserfs jfs xfs dm-mod dm-zero dm-mirror dm-snapshot dm-multipath dm-round-robin dm-emc vfat ; do /sbin/modprobe $i ; done

export ANACONDA_PRODUCTNAME="Fedora"
export ANACONDA_PRODUCTVERSION=$(rpm -q fedora-release --qf "%{VERSION}")
export ANACONDA_BUGURL="https://bugzilla.redhat.com/bugzilla/"

export PATH=/sbin:/usr/sbin:$PATH

if [ -z "$LANG" ]; then 
  LANG="en_US.UTF-8"
fi

# eventually, we might want to allow a more "normal" install path
ANACONDA="/usr/sbin/anaconda --method=livecd://$LIVE_BLOCK --lang $LANG"

if [ -x /usr/sbin/setenforce -a -e /selinux/enforce ]; then
    current=$(cat /selinux/enforce)
    /usr/sbin/setenforce 0
fi

if [ -x /usr/bin/hal-lock ]; then
    /usr/bin/hal-lock --interface org.freedesktop.Hal.Device.Storage --exclusive --run "$ANACONDA"
else
    $ANACONDA
fi

if [ -n $current ]; then
    /usr/sbin/setenforce $current
fi