Subversion Repositories livecd

Rev

Rev 29 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 29 Rev 30
Line 19... Line 19...
19
RPMS_TO_REMOVE="kernel-module-squashfs \
19
RPMS_TO_REMOVE="kernel-module-squashfs \
20
                kernel-module-unionfs \
20
                kernel-module-unionfs \
21
                unionfs \
21
                unionfs \
22
                squashfs"
22
                squashfs"
23
 
23
 
24
# RPMs that can break future Scientific Linux udpates
24
# RPMs that can break future Scientific Linux updates
25
# because there are not part of Scientific Linux
25
# because there are not part of Scientific Linux
26
RPMS_TO_REMOVE_SL="kernel-module-ntfs"
26
RPMS_TO_REMOVE_SL="kernel-module-ntfs"
27
                   
27
                   
28
# RPMs that can break future PSI udpates
28
# RPMs that can break future PSI SL updates
29
# because there are not part of PSI Scientific Linux
29
# because there are not part of PSI Scientific Linux
30
RPMS_TO_REMOVE_PSI=""
30
RPMS_TO_REMOVE_PSI=""
31
                   
31
                   
32
# files which should be restored from .ori files
32
# files which should be restored from .ori files
33
FILES_RESTORE="/etc/init.d/netfs \
33
FILES_RESTORE="/etc/init.d/netfs \
Line 192... Line 192...
192
echo "Output of 'fdisk -l' ..."
192
echo "Output of 'fdisk -l' ..."
193
fdisk -l
193
fdisk -l
194
echo
194
echo
195
 
195
 
196
 
196
 
197
### test if $INSTALL_PART is defined and exists
197
### test if $INSTALL_PART is defined
198
### -----------------------------------------------------------
198
### -----------------------------------------------------------
199
if [ ! $INSTALL_PART ]; then
199
if [ ! $INSTALL_PART ]; then
200
    echo "No partition defined for installation"
200
    echo "No partition defined for installation"
201
    echo "Please see '$SCRIPTNAME -h'."; echo
201
    echo "Please see '$SCRIPTNAME -h'"; echo
202
    exit_now 1
202
    exit_now 1
203
fi
203
fi
204
 
204
 
205
 
205
 
206
### test if MBR_DEV is given
206
### test if MBR_DEV is given
207
### -----------------------------------------------------------
207
### -----------------------------------------------------------
208
if [ ! $NOGRUB ]; then
208
if [ ! $NOGRUB ]; then
209
    if [ ! $MBR_DEV ]; then
209
    if [ ! $MBR_DEV ]; then
210
	echo "No MBR device defined."
210
	echo "No MBR device defined."
211
	echo "Please see '$SCRIPTNAME -h'."; echo
211
	echo "Please see '$SCRIPTNAME -h'"; echo
212
	exit_now 1
212
	exit_now 1
213
    fi
213
    fi
214
fi
214
fi
215
 
215
 
216
 
216
 
217
### test if $INSTALL_PART exists
217
### test if $INSTALL_PART exists
218
### -----------------------------------------------------------
218
### -----------------------------------------------------------
219
fdisk -l | cut -d" " -f1 | grep -q "^${INSTALL_PART}$"
219
fdisk -l | cut -d" " -f1 | grep -q "^${INSTALL_PART}$"
220
if [ "$?" != "0" ]; then
220
if [ "$?" != "0" ]; then
221
    echo "Partition $INSTALL_PART not found! See 'fdisk -l'"
221
    echo "Partition $INSTALL_PART not found! See 'fdisk -l'"
222
    echo "or you have to reboot first to make the partition table active"; echo
222
    echo "Or you have to reboot first to make the partition table active"; echo
223
    exit_now 1
223
    exit_now 1
224
fi
224
fi
225
 
225
 
226
 
226
 
227
### set $INSTALL_DEV (eg. /dev/sda)
227
### test if $INSTALL_PART is a Linux partition
228
### -----------------------------------------------------------
228
### -----------------------------------------------------------
-
 
229
fdisk -l | grep "Linux$" | cut -d" " -f1 | grep -q "^${INSTALL_PART}$"
-
 
230
if [ "$?" != "0" ]; then
229
INSTALL_DEV=$( echo "$INSTALL_PART" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' )
231
    echo "Partition $INSTALL_PART is not a Linux partition! (see 'fdisk -l')"
-
 
232
    echo "Use fdisk and/or qtparted to create a Linux partition!"
230
INSTALL_PART_NR=$( echo "$INSTALL_PART" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' )
233
    echo "You have to reboot first to make the partition table active"; echo
-
 
234
    exit_now 1
-
 
235
fi
231
 
236
 
232
 
237
 
233
### test if $SWAP_PART exists
238
### test if $SWAP_PART exists and is a Linux Swap partition
234
### -----------------------------------------------------------
239
### -----------------------------------------------------------
235
if [ $SWAP_PART ]; then
240
if [ $SWAP_PART ]; then
236
    fdisk -l | cut -d" " -f1 | grep -q "^${SWAP_PART}$"
241
    fdisk -l | cut -d" " -f1 | grep -q "^${SWAP_PART}$"
237
    if [ "$?" != "0" ]; then
242
    if [ "$?" != "0" ]; then
238
	echo "Swap partition $SWAP_PART not found! (see 'fdisk -l')"
243
	echo "Swap partition $SWAP_PART not found! (see 'fdisk -l')"
239
	echo "Or you have to reboot first to make the partition table active"; echo
244
	echo "Or you have to reboot first to make the partition table active"; echo
240
	exit_now 1
245
	exit_now 1
241
    fi
246
    fi
242
    fdisk -l | grep "Linux swap" | cut -d" " -f1 | grep -q "^${SWAP_PART}$"
247
    fdisk -l | grep "Linux swap$" | cut -d" " -f1 | grep -q "^${SWAP_PART}$"
243
    if [ "$?" != "0" ]; then
248
    if [ "$?" != "0" ]; then
244
	echo "Partition $SWAP_PART is not a Linux swap partition! (see 'fdisk -l')"
249
	echo "Partition $SWAP_PART is not a Linux swap partition! (see 'fdisk -l')"
245
	echo "Use fdisk to create a Linux swap partition!"
250
	echo "Use fdisk and/or qtparted to create a Linux Swap partition!"
246
	echo "You have to reboot first to make the partition table active"; echo
251
	echo "You have to reboot first to make the partition table active"; echo
247
	exit_now 1
252
	exit_now 1
248
    fi
253
    fi
249
fi
254
fi
250
 
255
 
251
 
256
 
-
 
257
### set $INSTALL_DEV (eg. /dev/sda)
-
 
258
### -----------------------------------------------------------
-
 
259
INSTALL_DEV=$( echo "$INSTALL_PART" | sed -e 's%\([sh]d[a-z]\)[0-9]*$%\1%' )
-
 
260
INSTALL_PART_NR=$( echo "$INSTALL_PART" | sed -e 's%.*/[sh]d[a-z]\([0-9]*\)$%\1%' )
-
 
261
 
-
 
262
 
252
 ### print warning
263
### print warning
253
### -----------------------------------------------------------
264
### -----------------------------------------------------------
254
echo                     "------------------------------------------------------------"
265
echo                     "------------------------------------------------------------"
255
echo                     "   LiveCD will be installed on partition $INSTALL_PART"
266
echo                     "   LiveCD will be installed on partition $INSTALL_PART"
256
[ "$SWAP_PART" ] && echo " Partition $SWAP_PART will be used as swap partition."
267
[ "$SWAP_PART" ] && echo " Partition $SWAP_PART will be used as swap partition."