From 8a3d2ff3a55bf5fe28e1bce5c2fcc79d0a54a2b2 Mon Sep 17 00:00:00 2001 From: Ulrich Dangel Date: Mon, 16 Jan 2012 11:40:12 +0100 Subject: [PATCH 1/1] Try to read grml-autoconfig bootparameters from 9p virtio filesystem. The idea is to share a filesystem with the mount-tag grml-parameters which will be used to add additional commandline parameters to your system. --- autoconfig.functions | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/autoconfig.functions b/autoconfig.functions index 6e0a6b8..b890f4c 100755 --- a/autoconfig.functions +++ b/autoconfig.functions @@ -40,6 +40,17 @@ if [ -z "$CMDLINE" ]; then CMDLINE="$(cat /proc/cmdline)" [ -d /cdrom/bootparams/ ] && CMDLINE="$CMDLINE $(cat /cdrom/bootparams/* | tr '\n' ' ')" [ -d /live/image/bootparams/ ] && CMDLINE="$CMDLINE $(cat /live/image/bootparams/* | tr '\n' ' ')" + modprobe 9p 2>/dev/null || true + if grep -q 9p /proc/filesystems ; then + local TAG="grml-parameters" + if grep -q "$TAG" /sys/bus/virtio/devices/*/mount_tag 2>/dev/null ; then + local MOUNTDIR="$(mktemp -d)" + mount -t 9p -o trans=virtio,ro "$TAG" "$MOUNTDIR" + CMDLINE="$CMDLINE $(cat "$MOUNTDIR"/* 2>/dev/null | tr '\n' ' ')" + umount "$MOUNTDIR" + rmdir "$MOUNTDIR" + fi + fi fi # }}} -- 2.1.4