Subversion Repositories livecd

Rev

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

Rev 159 Rev 160
Line 17... Line 17...
17
# - add functions get_dhcp_lease() and load_network_modules()
17
# - add functions get_dhcp_lease() and load_network_modules()
18
# - add ata_piix to modprobe_usb_sata_modules
18
# - add ata_piix to modprobe_usb_sata_modules
19
# - works with unionfs 2.x
19
# - works with unionfs 2.x
20
# - better detection of network card in case of diskless client
20
# - better detection of network card in case of diskless client
21
# - add sg, sata_nv module
21
# - add sg, sata_nv module
-
 
22
# - to allow LiveCD mounted over CIFS (for diskless client)
22
#
23
#
23
 
24
 
24
# ===========================================================
25
# ===========================================================
25
# user interface functions
26
# user interface functions
26
# ===========================================================
27
# ===========================================================
Line 331... Line 332...
331
      # FOUND=`ls -A1d $DIR/livecd.sgn $DIR/*/livecd.sgn 2>/dev/null | head -n 1`
332
      # FOUND=`ls -A1d $DIR/livecd.sgn $DIR/*/livecd.sgn 2>/dev/null | head -n 1`
332
      FOUND=`find $DIR -name livecd.sgn -type f | head -n 1`
333
      FOUND=`find $DIR -name livecd.sgn -type f | head -n 1`
333
      if [ "$FOUND" != "" ]; then 
334
      if [ "$FOUND" != "" ]; then 
334
         dirname "$FOUND"
335
         dirname "$FOUND"
335
      fi
336
      fi
-
 
337
 
-
 
338
   elif [ "CIFSROOT" != "" ] ; then
-
 
339
      DIR="/$1/cifs"
-
 
340
      mkdir -p $DIR
-
 
341
 
-
 
342
      # disable kernel warnings
-
 
343
      PRINTK=`cat /proc/sys/kernel/printk`
-
 
344
      echo "0" >/proc/sys/kernel/printk
-
 
345
      # try to mount cifs dir
-
 
346
      mount -t cifs $CIFSROOT $DIR -o ro,$CIFS_OPTS
-
 
347
      # enable kernel warnings
-
 
348
      echo "$PRINTK" >/proc/sys/kernel/printk
-
 
349
 
-
 
350
      FOUND=`ls -A1d $DIR/livecd.sgn $DIR/*/livecd.sgn 2>/dev/null | head -n 1`
-
 
351
      if [ "$FOUND" != "" ]; then
-
 
352
         dirname "$FOUND"
-
 
353
      fi
-
 
354
 
336
   else
355
   else
337
      list_block_devices | while read DEVICE; do
356
      list_block_devices | while read DEVICE; do
338
         DIR="/$1/`basename $DEVICE`"
357
         DIR="/$1/`basename $DEVICE`"
339
         mount_device $DEVICE $DIR
358
         mount_device $DEVICE $DIR
340
         if [ $? -ne 0 ]; then continue; fi
359
         if [ $? -ne 0 ]; then continue; fi
Line 425... Line 444...
425
   modprobe_module fscache
444
   modprobe_module fscache
426
   modprobe_module nfs_acl
445
   modprobe_module nfs_acl
427
   modprobe_module nfs
446
   modprobe_module nfs
428
}
447
}
429
 
448
 
-
 
449
# modprobe cifs kernel module
-
 
450
#
-
 
451
modprobe_cifs_modules()
-
 
452
{
-
 
453
  echolog "starting cifs support"
-
 
454
  modprobe_module cifs
-
 
455
}
-
 
456
 
430
# enable/disable CD autoejecting when unmounted
457
# enable/disable CD autoejecting when unmounted
431
# $1 = 1|0 ... enable|disable
458
# $1 = 1|0 ... enable|disable
432
#
459
#
433
cd_autoeject()
460
cd_autoeject()
434
{
461
{