X-Git-Url: https://git.cyclocoop.org/?p=lhc%2Fateliers.git;a=blobdiff_plain;f=ateliers_hosted;h=49c4c10ad3cf325fee4075350a74920c60c63ac0;hp=306bf2f87e100d387fa572b8a949dacfcf89ca41;hb=caa6a54495a1b5ac9cbccc9774b35154be771051;hpb=698ada27ce0f9d7f0bc6c9135eb5709d1497cfcb diff --git a/ateliers_hosted b/ateliers_hosted index 306bf2f..49c4c10 100755 --- a/ateliers_hosted +++ b/ateliers_hosted @@ -1,5 +1,5 @@ #!/bin/sh -set -e -f ${DRY_RUN:+-n} -u ${TRACE:+-x} +set -e -f ${DRY_RUN:+-n} -u tool=${0%/*} . "$tool"/env.sh . "$tool"/inc.sh @@ -12,18 +12,14 @@ rule_help () { Voir \`$tool/ateliers_host' pour les utilitaires côté machine hôte. SYNTAX: $0 \$RULE \${RULE}_SYNTAX RULES: - $(sed -ne 's/^rule_\([^ ]*\) () {\( *#.*\|\)/\t\1\2/p' "$0") + $(sed -ne 's/^rule_\([^_][^ ]*\) () {\( *#.*\|\)/\t\1\2/p' "$0") ENVIRONMENT: + TRACE # affiche les commandes avant leur exécution $(sed -ne 's/^readonly \([^ =]*\).*}\( *#.*\|\)$/\t$\1\2/p' "$tool"/env.sh "$0") EOF } rule_filesystem_mount () { - mountpoint /proc || - mount -t proc proc /proc - mountpoint /sys || - mount -t sysfs sys /sys - mountpoint /dev } rule_filesystem_unmount () { ! mountpoint /proc || @@ -177,4 +173,5 @@ rule_kernel_init () { rule=${1:-help} ${1+shift} +set "${TRACE:+-x}" rule_$rule "$@"