From: Ulrich Dangel Date: Tue, 20 Dec 2011 23:47:56 +0000 (+0100) Subject: Automatically try to mount configfs X-Git-Tag: v0.9.43~1 X-Git-Url: http://git.grml.org/?p=grml-autoconfig.git;a=commitdiff_plain;h=f7359bd0bfd5b036537ee0941714a024d4291cc3 Automatically try to mount configfs --- diff --git a/autoconfig b/autoconfig index 620d9d2..5e9b10c 100644 --- a/autoconfig +++ b/autoconfig @@ -51,6 +51,7 @@ CONFIG_AUTOMOUNT='yes' # automounting of device labeled GRMLCFG CONFIG_BLANKING='yes' # check for bootoption noblank to disable console blanking CONFIG_CONFIG='yes' # do we want config unpacking to work? CONFIG_CONSOLE='yes' # activate mgetty when using console=... as bootparam +CONFIG_CONFIGFS='yes' # automatically mount configfs CONFIG_DEBOOTSTRAP='yes' # support automatic installation of Debian via grml-deboostrap CONFIG_DEBNET='yes' # search for /etc/network/interfaces on partitions and set up network afterwards CONFIG_DEBS='yes' # check for bootoption debs for installing .debs diff --git a/autoconfig.functions b/autoconfig.functions index e133004..d166998 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -399,6 +399,23 @@ config_userfstab(){ } # }}} +# {{{ mount configfs +config_configfs() { + einfo "Mounting configfs" + CONFIGFS_DIR=/sys/kernel/config/ + modprobe configfs 2>/dev/null 1>&2 + if ! [ -d "$CONFIGFS_DIR" ] ; then + eindent + einfo "$CONFIGFS_DIR does not exist, can't mount directory" + eend 1 + eoutdent + else + mount -t configfs configfs "$CONFIGFS_DIR" 2>/dev/null 1>&2 + eend $? + fi +} +# }}} + # {{{ Set clock (Local time is more often used than GMT, so it is default) config_time(){ # don't touch the files if running from harddisk: diff --git a/grml-autoconfig b/grml-autoconfig index c561418..4e69dbb 100755 --- a/grml-autoconfig +++ b/grml-autoconfig @@ -95,6 +95,8 @@ checkvalue $CONFIG_HOSTNAME && config_hostname checkvalue $CONFIG_USERFSTAB && config_userfstab +checkvalue $CONFIG_CONFIGFS && config_configfs + checkvalue $CONFIG_TIME && config_time checkvalue $CONFIG_KERNEL && config_kernel