Subversion Repositories livecd

Rev

Rev 161 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 161 Rev 162
Line 326... Line 326...
326
      echo "0" >/proc/sys/kernel/printk
326
      echo "0" >/proc/sys/kernel/printk
327
      # try to mount nfs dir
327
      # try to mount nfs dir
328
      mount -t nfs -o $NFSOPT $NFSROOT $DIR
328
      mount -t nfs -o $NFSOPT $NFSROOT $DIR
329
      # enable kernel warnings
329
      # enable kernel warnings
330
      echo "$PRINTK" >/proc/sys/kernel/printk
330
      echo "$PRINTK" >/proc/sys/kernel/printk
-
 
331
   fi
331
 
332
 
332
      # FOUND=`ls -A1d $DIR/livecd.sgn $DIR/*/livecd.sgn 2>/dev/null | head -n 1`
-
 
333
      FOUND=`find $DIR -name livecd.sgn -type f | head -n 1`
-
 
334
      if [ "$FOUND" != "" ]; then 
-
 
335
         dirname "$FOUND"
-
 
336
      fi
-
 
337
 
-
 
338
   elif [ "CIFSROOT" != "" ] ; then
333
   if [ "$CIFSROOT" != "" ]; then
339
      DIR="/$1/cifs"
334
      DIR="/$1/cifs"
340
      mkdir -p $DIR
335
      mkdir -p $DIR
341
 
336
 
342
      # disable kernel warnings
337
      # disable kernel warnings
343
      PRINTK=`cat /proc/sys/kernel/printk`
338
      PRINTK=`cat /proc/sys/kernel/printk`
344
      echo "0" >/proc/sys/kernel/printk
339
      echo "0" >/proc/sys/kernel/printk
345
      # try to mount cifs dir
340
      # try to mount cifs dir
346
      mount -t cifs $CIFSROOT $DIR -o ro,$CIFSOPTS
341
      mount -t cifs $CIFSROOT $DIR -o ro,$CIFSOPTS
347
      # enable kernel warnings
342
      # enable kernel warnings
348
      echo "$PRINTK" >/proc/sys/kernel/printk
343
      echo "$PRINTK" >/proc/sys/kernel/printk
-
 
344
   fi
349
 
345
 
-
 
346
   if [ "$DIR" = "" ]; then
-
 
347
       list_block_devices | while read DEVICE; do
-
 
348
	   DIR="/$1/`basename $DEVICE`"
-
 
349
	   mount_device $DEVICE $DIR
-
 
350
	   if [ $? -ne 0 ]; then continue; fi
350
      FOUND=`ls -A1d $DIR/livecd.sgn $DIR/*/livecd.sgn 2>/dev/null | head -n 1`
351
	   # FOUND=`ls -A1d $DIR/livecd.sgn $DIR/*/livecd.sgn 2>/dev/null | head -n 1`
-
 
352
	   FOUND=`find $DIR -name livecd.sgn -type f | head -n 1`
351
      if [ "$FOUND" != "" ]; then
353
	   if [ "$FOUND" = "" ]; then umount $DIR 2>/dev/null; rmdir $DIR 2>/dev/null
352
         dirname "$FOUND"
354
	   else dirname "$FOUND"; return 1; fi
353
      fi
355
       done
354
 
-
 
355
   else
356
   else
356
      list_block_devices | while read DEVICE; do
357
      # FOUND=`ls -A1d $DIR/livecd.sgn $DIR/*/livecd.sgn 2>/dev/null | head -n 1`
357
         DIR="/$1/`basename $DEVICE`"
-
 
358
         mount_device $DEVICE $DIR
-
 
359
         if [ $? -ne 0 ]; then continue; fi
-
 
360
         FOUND=`ls -A1d $DIR/livecd.sgn $DIR/*/livecd.sgn 2>/dev/null | head -n 1`
358
       FOUND=`find $DIR -name livecd.sgn -type f | head -n 1`
361
         if [ "$FOUND" = "" ]; then umount $DIR 2>/dev/null; rmdir $DIR 2>/dev/null
359
       if [ "$FOUND" != "" ]; then 
362
         else dirname "$FOUND"; return 1; fi
360
	   dirname "$FOUND"
363
      done
361
       fi
364
   fi
362
   fi
-
 
363
 
365
}
364
}
366
 
365
 
367
# ===========================================================
366
# ===========================================================
368
# hardware preparation functions
367
# hardware preparation functions
369
# ===========================================================
368
# ===========================================================