X-Git-Url: https://git.grml.org/?p=grml-autoconfig.git;a=blobdiff_plain;f=autoconfig.functions;h=e81392145d00cd49200d6006d7fb0384678fc6cb;hp=f30668ac51f6c028ca98d05e3b479777970bf77e;hb=b4e2826b9b5ba086d294caca298736a7468b74c1;hpb=c13a5d8cb3b66d6903089474649649336ccd090c diff --git a/autoconfig.functions b/autoconfig.functions index f30668a..e813921 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -617,16 +617,6 @@ fi } # }}} -# For burning on IDE-CD-Roms, k3b (and others) check for special permissions {{{ -config_cdrom_perm(){ -CDROMS="" -for DEVICE in /proc/ide/hd?; do - [ "$(cat $DEVICE/media 2>/dev/null)" = "cdrom" ] && CDROMS="$CDROMS /dev/${DEVICE##*/}" -done -[ -n "$CDROMS" ] && { chown root.cdrom $CDROMS; chmod 666 $CDROMS; } 2>/dev/null -} -# }}} - # {{{ Bring up loopback interface now config_local_net(){ if [ -z "$INSTALLED" ] ; then @@ -1138,19 +1128,6 @@ if checkbootparam 'swap' || checkbootparam 'anyswap' ; then checkbootparam 'anyswap' && export ANYSWAP='yes' || export ANYSWAP="" fi -if checkbootparam 'nofstab' || checkbootparam 'forensic' ; then - ewarn "Skipping /etc/fstab creation as requested on boot commandline." ; eend 0 -else - einfo "Scanning for harddisk partitions and creating /etc/fstab. (Disable this via boot option: nofstab)" - iszsh && setopt nonomatch - if [ -x /usr/sbin/rebuildfstab ] ; then - config_userfstab || fstabuser=grml - /usr/sbin/rebuildfstab -r -u $fstabuser -g $fstabuser ; eend $? - else - ewarn "Command rebuildfstab not found. Install package grml-rebuildfstab." ; eend 1 - fi -fi # checkbootparam nofstab/forensic - # Scan for swap, config, homedir - but only in live-mode if [ -z "$INSTALLED" ] ; then [ -z "$NOSWAP" ] && einfo "Searching for swap partition(s) as requested." @@ -1566,34 +1543,6 @@ fi } # }}} -# {{{ keyboard add-ons -config_setkeycodes(){ -if checkbootparam 'setkeycodes' ; then - einfo "Setting keycodes as requested via bootparameter 'setkeycodes'." - # MS MM keyboard add-on - # fix - setkeycodes e001 126 &>/dev/null - setkeycodes e059 127 &>/dev/null - # fn keys - setkeycodes e03b 59 &>/dev/null - setkeycodes e008 60 &>/dev/null - setkeycodes e007 61 &>/dev/null - setkeycodes e03e 62 &>/dev/null - setkeycodes e03f 63 &>/dev/null - setkeycodes e040 64 &>/dev/null - setkeycodes e041 65 &>/dev/null - setkeycodes e042 66 &>/dev/null - setkeycodes e043 67 &>/dev/null - setkeycodes e023 68 &>/dev/null - setkeycodes e057 87 &>/dev/null - setkeycodes e058 88 &>/dev/null - # hp keycodes - setkeycodes e00a 89 e008 90 &>/dev/null - eend 0 -fi -} -# }}} - # {{{ wondershaper config_wondershaper(){ if checkbootparam 'wondershaper' ; then @@ -1832,8 +1781,11 @@ config_finddcsdir() { # foo, even if a GRMLCFG partition is present. DCSDIR="" DCSMP="/mnt/grml" +# autoconfig, see issue673 +GRMLCFG="$(getbootparam 'autoconfig' 2>>$DEBUG)" +[ -n "$GRMLCFG" ] || GRMLCFG="GRMLCFG" if checkbootparam 'noautoconfig' || checkbootparam 'forensic' ; then - ewarn "Skipping running automount of device(s) labeled GRMLCFG as requested." ; eend 0 + ewarn "Skipping running automount of device(s) labeled $GRMLCFG as requested." ; eend 0 else if [ -z "$INSTALLED" ] ; then if checkbootparam 'myconfig' ; then @@ -1842,7 +1794,7 @@ else eerror "Error: No device for bootoption myconfig provided." ; eend 1 fi # [ -z "$DCSDEVICE" ] elif checkvalue $CONFIG_MYCONFIG; then # checkbootparam myconfig - einfo "Searching for device(s) labeled with GRMLCFG. (Disable this via boot option: noautoconfig)" ; eend 0 + einfo "Searching for device(s) labeled with $GRMLCFG. (Disable this via boot option: noautoconfig)" ; eend 0 eindent # We do need the following fix so floppy disk is available to blkid in any case :-/ if [ -r /dev/fd0 ] ; then @@ -1851,7 +1803,7 @@ else blkid /dev/fd0 >>$DEBUG 2>&1 fi fi - DCSDEVICE=$(blkid -t LABEL=GRMLCFG | head -1 | awk -F: '{print $1}') + DCSDEVICE=$(blkid -t LABEL=$GRMLCFG | head -1 | awk -F: '{print $1}') if [ -n "$DCSDEVICE" ]; then DCSMP="/mnt/grmlcfg" fi @@ -1985,9 +1937,13 @@ if checkbootparam 'config' || [ "$DCSMP" = "/mnt/grmlcfg" ]; then fi fi fi -# umount $DCSMP if it was mounted by finddcsdir -# this doesn't really belong here -grep -q '$DCSMP' /proc/mounts && umount $DCSMP +} +# }}} + +# {{{ confing_umount_dcsdir +config_umount_dcsdir(){ + # umount $DCSMP if it was mounted by finddcsdir + grep -q "$DCSMP" /proc/mounts && umount "$DCSMP" } # }}}