forked from openSUSE/installation-images
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install.i386
executable file
·105 lines (86 loc) · 3.5 KB
/
install.i386
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
#! /bin/sh
# gets ARCH, THEMES, DESTDIR, INSTSYS_PARTS, BOOT_PARTS, WITH_FLOPPY via env
set -e
shopt -s extglob
# create directory layout
mkdir -p $DESTDIR/CD1/boot/$ARCH/loader
for theme in $THEMES ; do
mkdir -p $DESTDIR/branding/$theme/CD1/boot/$ARCH
done
# copy branding independent parts
for i in $INSTSYS_PARTS $BOOT_PARTS ; do
[ -e images/$i ] && cp -r images/$i $DESTDIR/CD1/boot/$ARCH
done
# xen kernel
for i in images/vmlinuz-+([^.]) ; do
[ -d "$i" ] && cp "$i/linux" $DESTDIR/CD1/boot/$ARCH/`basename $i`
done
# biostest goes to 'loader' dir
if [ -e $DESTDIR/CD1/boot/$ARCH/biostest ] ; then
mv $DESTDIR/CD1/boot/$ARCH/biostest $DESTDIR/CD1/boot/$ARCH/loader/biostest
fi
# copy branding dependent parts
for theme in $THEMES ; do
for i in $INSTSYS_PARTS $BOOT_PARTS ; do
for ii in images/$theme/$i ; do
[ -e $ii ] && cp -r $ii $DESTDIR/branding/$theme/CD1/boot/$ARCH
done
done
if [ -d images/$theme/EFI ] ; then
cp -r images/$theme/EFI/EFI $DESTDIR/branding/$theme/CD1
fi
# xen initrd
for i in images/$theme/initrd-+([^.]) ; do
[ -f "$i" ] && cp $i $DESTDIR/branding/$theme/CD1/boot/$ARCH
done
# might be missing if theme does not really exist
mkdir -p $DESTDIR/branding/$theme/CD1/boot/$ARCH/loader
# initrd goes to 'loader' dir
dir=$DESTDIR/branding/$theme/CD1/boot/$ARCH
if [ -e $dir/initrd ] ; then
mv $dir/initrd $dir/loader/initrd
# check for syslinux 6.x setup
if [ ! -e $dir/loader/gfxboot.cfg ] ; then
tmp/base/usr/sbin/gfxboot -a $dir/loader/bootlogo --change-config install::initrd.size=$(stat -c "%s" $dir/loader/initrd)
fi
fi
# cp etc/README $DESTDIR/branding/$theme/CD1/boot/$ARCH
# recode utf8..ibmpc <$DESTDIR/branding/$theme/CD1/boot/$ARCH/README >$DESTDIR/branding/$theme/CD1/boot/$ARCH/README.DOS
# cp etc/LIESMICH $DESTDIR/branding/$theme/CD1/boot/$ARCH
# recode utf8..ibmpc <$DESTDIR/branding/$theme/CD1/boot/$ARCH/LIESMICH >$DESTDIR/branding/$theme/CD1/boot/$ARCH/LIESMICH.DOS
# create boot floppies and put them in ftp tree
if [ "$WITH_FLOPPY" = 1 ] ; then
mkdir -p $DESTDIR/branding/$theme/FTP/boot/$ARCH/floppy
rm -rf tmp/floppy-$theme
mkdir -p tmp/floppy-$theme
cp -a $DESTDIR/CD1/boot/$ARCH/loader/* $DESTDIR/branding/openSUSE/CD1/boot/$ARCH/loader/* tmp/floppy-$theme
$DESTDIR/branding/$theme/CD1/boot/$ARCH/mkbootdisk --syslinux=tmp/base/usr/bin/syslinux --out=$DESTDIR/branding/$theme/FTP/boot/$ARCH/floppy/bootdisk tmp/floppy-$theme
fi
done
mkdir -p $DESTDIR/usr/share
cp images/mini-iso-rmlist $DESTDIR/usr/share
if [ -f images/rescue-server ] ; then
dst=$DESTDIR/usr/share/rescue-server/boot/x86_64
mkdir -p $dst
cp images/rescue-server $dst
echo "rescue: rescue-server" >$dst/config
cp -a $DESTDIR/CD1/boot/$ARCH/loader $DESTDIR/branding/$THEMES/CD1/boot/$ARCH/loader $dst
cp data/boot/syslinux-rescue.cfg $dst/loader/isolinux.cfg
fi
if [ -f images/zenroot ] ; then
dst=$DESTDIR/branding/Zen/CD1/boot/x86_64
mkdir -p $dst
cp images/zenroot $dst/root
echo "root: root" >$dst/config
cp -a $DESTDIR/CD1/boot/$ARCH/loader $DESTDIR/branding/$THEMES/CD1/boot/$ARCH/* $dst
[ -d "$DESTDIR/branding/$THEMES/CD1/EFI" ] && cp -a $DESTDIR/branding/$THEMES/CD1/EFI $DESTDIR/branding/Zen/CD1
cp data/boot/syslinux-zen.cfg $dst/loader/isolinux.cfg
cp data/boot/message-zen $dst/loader/message
fi
if [ -d images/tftp ] ; then
dst=$DESTDIR/usr/share/tftpboot-installation
mkdir -p $dst
cp -a images/tftp/* $dst
cp -a $DESTDIR/CD1/* $dst/*
cp -a $DESTDIR/branding/$THEMES/CD1/* $dst/*
fi