Code cleanup, drop config_dma + check_partitions [Closes: issue1305]
authorMichael Prokop <mika@grml.org>
Sat, 19 Apr 2014 21:25:37 +0000 (23:25 +0200)
committerMichael Prokop <mika@grml.org>
Sat, 19 Apr 2014 21:26:20 +0000 (23:26 +0200)
This code shouldn't be needed since ages any longer, let's
try to get rid of it.

autoconfig
autoconfig.functions
grml-autoconfig

index f024154..d892779 100644 (file)
@@ -60,7 +60,6 @@ CONFIG_DEBUG='yes'            # activate start of shells during startup at sever
 CONFIG_DISPLAY_SSH_FINGERPRINTS='yes' # display SSH server key fingerprints
 CONFIG_DISTCC='yes'           # activate and setup distcc through bootparam distcc=$NETWORK,$INTERFACE
 CONFIG_DISTRI='yes'           # support some customization via bootoption distri
-CONFIG_DMA='yes'              # Enable DMA for all IDE drives
 CONFIG_DMRAID='yes'           # support for dmraid
 CONFIG_EXTRACT='yes'          # specify which (only in combination with bootparam myconfig/netconfig useful)
 CONFIG_FAST='yes'             # skip startup of w3m on tty1
index 3694475..a4cc453 100755 (executable)
@@ -821,26 +821,6 @@ fi
 }
 # }}}
 
-# {{{ Collect partitions from /proc/partitions first for enabling DMA
-check_partitions(){
-partitions=""
-IDEDISKS=""
-while read major minor blocks partition relax; do
-  partition="${partition##*/}"
-  [ -z "$partition" -o ! -e "/dev/$partition" ] && continue
-  case "$partition" in
-    hd?) IDEDISKS="$IDEDISKS $partition";;                # IDE  Harddisk, entire disk
-    sd?) ;;                                               # SCSI Harddisk, entire disk
-#    [hs]d*) partitions="$partitions /dev/$partition";;    # IDE or SCSI disk partition
-    [hs]d*|ub*) partitions="$partitions /dev/$partition";;    # IDE, USB or SCSI disk partition
-  esac
-done <<EOT
-$(awk 'BEGIN{old="__start"}{if($0==old){exit}else{old=$0;if($4&&$4!="name"){print $0}}}' /proc/partitions)
-EOT
-}
-check_partitions >/dev/null 2>&1 # avoid output "check_partitions:3: read-only file system"
-# }}}
-
 # {{{ Start brltty
 config_brltty() {
   if checkbootparam 'brltty' ; then
@@ -849,27 +829,6 @@ config_brltty() {
 }
 # }}}
 
-# {{{ Enable DMA for all IDE drives now if not disabled
-# Notice: Already done by linuxrc, but make sure it's done also on harddisk-installed systems
-config_dma(){
-if checkbootparam 'nodma'; then
-  ewarn "Skipping DMA accelleration as requested on boot commandline." ; eend 0
-else
-  for d in $(cd /proc/ide 2>>$DEBUG && echo hd[a-z]); do
-    if test -d /proc/ide/$d; then
-      if egrep -q 'using_dma[ \t]+0' /proc/ide/$d/settings 2>>$DEBUG; then
-        MODEL="$(cat /proc/ide/$d/model 2>>$DEBUG)"
-        test -z "$MODEL" && MODEL="[GENERIC IDE DEVICE]"
-        einfo "Enabling DMA acceleration for: ${WHITE}$d        ${YELLOW}[${MODEL}]${NORMAL}"
-        echo "using_dma:1" >/proc/ide/$d/settings
-        eend 0
-      fi
-    fi
-  done
-fi
-}
-# }}}
-
 # {{{ Start creating /etc/fstab with HD partitions and USB SCSI devices now
 config_fstab(){
 
@@ -2231,6 +2190,7 @@ fi # checkbootparam "BOOT_IMAGE=debian2hd
 }
 # }}}
 
+# {{{ virtualbox shared folders
 config_virtualbox_shared_folders() {
 if $VIRTUALBOX ; then
   einfo "VirtualBox detected, trying to set up Shared Folders."
@@ -2320,6 +2280,7 @@ if $VIRTUALBOX ; then
   fi
 fi
 }
+# }}}
 
 # {{{ Support customization
 config_distri(){
index c0c1d47..224adf6 100755 (executable)
@@ -121,8 +121,6 @@ checkvalue $CONFIG_BRLTTY && config_brltty
 
 checkvalue $CONFIG_ACPI && config_acpi
 
-checkvalue $CONFIG_DMA && config_dma
-
 checkvalue $CONFIG_FSTAB && config_fstab
 
 checkvalue $CONFIG_MOUSE && config_mouse