| Line 213... |
Line 213... |
| 213 |
|
213 |
|
| 214 |
|
214 |
|
| 215 |
### test if $INSTALL_PART is defined
|
215 |
### test if $INSTALL_PART is defined
|
| 216 |
### -----------------------------------------------------------
|
216 |
### -----------------------------------------------------------
|
| 217 |
if [ ! $INSTALL_PART ]; then
|
217 |
if [ ! $INSTALL_PART ]; then
|
| 218 |
echo "No partition defined for installation"
|
218 |
echo "No partition defined for installation."
|
| 219 |
echo "Please see '$SCRIPTNAME -h'"; echo
|
219 |
echo "Please see '$SCRIPTNAME -h'."; echo
|
| 220 |
exit_now 1
|
220 |
exit_now 1
|
| 221 |
fi
|
221 |
fi
|
| 222 |
|
222 |
|
| 223 |
|
223 |
|
| 224 |
### test if MBR_DEV is given
|
224 |
### test if MBR_DEV is given
|
| 225 |
### -----------------------------------------------------------
|
225 |
### -----------------------------------------------------------
|
| 226 |
if [ ! $NOGRUB ]; then
|
226 |
if [ ! $NOGRUB ]; then
|
| 227 |
if [ ! $MBR_DEV ]; then
|
227 |
if [ ! $MBR_DEV ]; then
|
| 228 |
echo "No MBR device defined."
|
228 |
echo "No MBR device defined."
|
| 229 |
echo "Please see '$SCRIPTNAME -h'"; echo
|
229 |
echo "Please see '$SCRIPTNAME -h'."
|
| - |
|
230 |
echo
|
| 230 |
exit_now 1
|
231 |
exit_now 1
|
| 231 |
fi
|
232 |
fi
|
| 232 |
fi
|
233 |
fi
|
| 233 |
|
234 |
|
| 234 |
|
235 |
|
| 235 |
### test if $INSTALL_PART exists
|
236 |
### test if $INSTALL_PART exists
|
| 236 |
### -----------------------------------------------------------
|
237 |
### -----------------------------------------------------------
|
| 237 |
fdisk -l | cut -d" " -f1 | grep -q "^${INSTALL_PART}$"
|
238 |
fdisk -l | cut -d" " -f1 | grep -q "^${INSTALL_PART}$"
|
| 238 |
if [ "$?" != "0" ]; then
|
239 |
if [ "$?" != "0" ]; then
|
| 239 |
echo "Partition $INSTALL_PART not found! See 'fdisk -l'"
|
240 |
echo "Partition $INSTALL_PART not found! See 'fdisk -l'."
|
| 240 |
echo "Or you have to reboot first to make the partition table active"; echo
|
241 |
echo "Or you have to reboot first to make the partition table active."
|
| - |
|
242 |
echo
|
| 241 |
exit_now 1
|
243 |
exit_now 1
|
| 242 |
fi
|
244 |
fi
|
| 243 |
|
245 |
|
| 244 |
|
246 |
|
| 245 |
### test if $INSTALL_PART is a Linux partition
|
247 |
### test if $INSTALL_PART is a Linux partition
|
| 246 |
### -----------------------------------------------------------
|
248 |
### -----------------------------------------------------------
|
| 247 |
fdisk -l | grep "Linux$" | cut -d" " -f1 | grep -q "^${INSTALL_PART}$"
|
249 |
fdisk -l | grep "Linux$" | cut -d" " -f1 | grep -q "^${INSTALL_PART}$"
|
| 248 |
if [ "$?" != "0" ]; then
|
250 |
if [ "$?" != "0" ]; then
|
| 249 |
echo "Partition $INSTALL_PART is not a Linux partition! (see 'fdisk -l')"
|
251 |
echo "Partition $INSTALL_PART is not a Linux partition! (see 'fdisk -l')."
|
| 250 |
echo "Use fdisk and/or qtparted to create a Linux partition!"
|
252 |
echo "Use fdisk and/or qtparted to create a Linux partition!"
|
| 251 |
echo "You have to reboot first to make the partition table active"; echo
|
253 |
echo "You have to reboot first to make the partition table active."
|
| - |
|
254 |
echo
|
| 252 |
exit_now 1
|
255 |
exit_now 1
|
| 253 |
fi
|
256 |
fi
|
| 254 |
|
257 |
|
| 255 |
|
258 |
|
| 256 |
### test if $SWAP_PART exists and is a Linux Swap partition
|
259 |
### test if $SWAP_PART exists and is a Linux Swap partition
|
| 257 |
### -----------------------------------------------------------
|
260 |
### -----------------------------------------------------------
|
| 258 |
if [ $SWAP_PART ]; then
|
261 |
if [ $SWAP_PART ]; then
|
| 259 |
fdisk -l | cut -d" " -f1 | grep -q "^${SWAP_PART}$"
|
262 |
fdisk -l | cut -d" " -f1 | grep -q "^${SWAP_PART}$"
|
| 260 |
if [ "$?" != "0" ]; then
|
263 |
if [ "$?" != "0" ]; then
|
| 261 |
echo "Swap partition $SWAP_PART not found! (see 'fdisk -l')"
|
264 |
echo "Swap partition $SWAP_PART not found! (see 'fdisk -l')."
|
| 262 |
echo "Or you have to reboot first to make the partition table active"; echo
|
265 |
echo "Or you have to reboot first to make the partition table active."
|
| - |
|
266 |
echo
|
| 263 |
exit_now 1
|
267 |
exit_now 1
|
| 264 |
fi
|
268 |
fi
|
| 265 |
fdisk -l | grep "Linux swap" | cut -d" " -f1 | grep -q "^${SWAP_PART}$"
|
269 |
fdisk -l | grep "Linux swap" | cut -d" " -f1 | grep -q "^${SWAP_PART}$"
|
| 266 |
if [ "$?" != "0" ]; then
|
270 |
if [ "$?" != "0" ]; then
|
| 267 |
echo "Partition $SWAP_PART is not a Linux swap partition! (see 'fdisk -l')"
|
271 |
echo "Partition $SWAP_PART is not a Linux swap partition! (see 'fdisk -l')."
|
| 268 |
echo "Use fdisk and/or qtparted to create a Linux Swap partition!"
|
272 |
echo "Use fdisk and/or qtparted to create a Linux Swap partition !"
|
| 269 |
echo "You have to reboot first to make the partition table active"; echo
|
273 |
echo "You have to reboot first to make the partition table active."
|
| - |
|
274 |
echo
|
| 270 |
exit_now 1
|
275 |
exit_now 1
|
| 271 |
fi
|
276 |
fi
|
| 272 |
fi
|
277 |
fi
|
| 273 |
|
278 |
|
| 274 |
|
279 |
|
| Line 592... |
Line 597... |
| 592 |
|
597 |
|
| 593 |
### restore cronjobs
|
598 |
### restore cronjobs
|
| 594 |
### -----------------------------------------------------------
|
599 |
### -----------------------------------------------------------
|
| 595 |
mv $NEW/etc/cron_backup/sysstat $NEW/etc/cron.d/ 2>/dev/null
|
600 |
mv $NEW/etc/cron_backup/sysstat $NEW/etc/cron.d/ 2>/dev/null
|
| 596 |
mv $NEW/etc/cron_backup/00-makewhatis.cron.weekly $NEW/etc/cron.weekly/00-makewhatis.cron 2>/dev/null
|
601 |
mv $NEW/etc/cron_backup/00-makewhatis.cron.weekly $NEW/etc/cron.weekly/00-makewhatis.cron 2>/dev/null
|
| 597 |
mv $NEW/etc/cron_backup/* $NEW/etc/cron.daily/
|
602 |
mv $NEW/etc/cron_backup/* $NEW/etc/cron.daily/ 2>/dev/null
|
| 598 |
|
603 |
|
| 599 |
|
604 |
|
| 600 |
### prepare chroot to $NEW
|
605 |
### prepare chroot to $NEW
|
| 601 |
### -----------------------------------------------------------
|
606 |
### -----------------------------------------------------------
|
| 602 |
mount --bind /dev $NEW/dev
|
607 |
mount --bind /dev $NEW/dev
|
| Line 643... |
Line 648... |
| 643 |
mv -f $NEW/etc/X11/xorg.conf.nv_SAVED $NEW/etc/X11/xorg.conf
|
648 |
mv -f $NEW/etc/X11/xorg.conf.nv_SAVED $NEW/etc/X11/xorg.conf
|
| 644 |
# disable nvidia libs
|
649 |
# disable nvidia libs
|
| 645 |
LIB=lib
|
650 |
LIB=lib
|
| 646 |
[ $( arch ) = "x86_64" ] && LIB=lib64
|
651 |
[ $( arch ) = "x86_64" ] && LIB=lib64
|
| 647 |
mv -f $NEW/usr/X11R6/$LIB/modules/extensions/xxx.libGLcore.a.saved_by_nvidia \
|
652 |
mv -f $NEW/usr/X11R6/$LIB/modules/extensions/xxx.libGLcore.a.saved_by_nvidia \
|
| 648 |
$NEW/usr/X11R6/$LIB/modules/extensions/libGLcore.a
|
653 |
$NEW/usr/X11R6/$LIB/modules/extensions/libGLcore.a 2>/dev/null
|
| 649 |
mv -f $NEW/usr/X11R6/$LIB/modules/extensions/xxx.libglx.a.saved_by_nvidia \
|
654 |
mv -f $NEW/usr/X11R6/$LIB/modules/extensions/xxx.libglx.a.saved_by_nvidia \
|
| 650 |
$NEW/usr/X11R6/$LIB/modules/extensions/libglx.a
|
655 |
$NEW/usr/X11R6/$LIB/modules/extensions/libglx.a 2>/dev/null
|
| 651 |
rm -f $NEW/usr/X11R6/$LIB/modules/extensions/libglx.so
|
656 |
rm -f $NEW/usr/X11R6/$LIB/modules/extensions/libglx.so
|
| 652 |
rm -f $NEW/usr/X11R6/$LIB/libGL.so*
|
657 |
rm -f $NEW/usr/X11R6/$LIB/libGL.so*
|
| 653 |
rm -f $NEW/usr/$LIB/libGLcore.so
|
658 |
rm -f $NEW/usr/$LIB/libGLcore.so
|
| 654 |
fi
|
659 |
fi
|
| 655 |
fi
|
660 |
fi
|