Correction : $TRACE seulement dans rule() .
[lhc/ateliers.git] / vm_hosted
index 750497c..065c07b 100755 (executable)
--- a/vm_hosted
+++ b/vm_hosted
@@ -10,7 +10,8 @@ rule_help () { # SYNTAX: [--hidden]
                DESCRIPTION:
                  ce script regroupe des règles pour administrer la VM ($vm_fqdn)
                  _depuis_ la VM hébergée ($vm_fqdn) ;
-                 il sert à la fois d'outil et de documentation.
+                 il sert à la fois d'outil (aisément bidouillable)
+                 et de documentation (préçise).
                  Voir \`$tool/vm_host' pour les règles côté machine hôte ($vm_host).
                SYNTAX: $0 \$RULE \${RULE}_SYNTAX
                RULES:
@@ -31,7 +32,7 @@ rule_git_config () {
 rule_git_reset () {
        (
        cd "$tool"
-       git checkout -f -B master origin
+       git checkout -f -B master remotes/master
        git clean -f -d -x
        )
  }
@@ -64,7 +65,7 @@ rule_apt_init () {
  }
 rule_apticron_init () {
        sudo apt-get install --reinstall apticron
-       mk_reg mod=644 own=root:root /etc/default/grub <<-EOF
+       mk_reg mod=644 own=root:root /etc/apticron/apticron.conf <<-EOF
                EMAIL="admin@heureux-cyclage.org"
                # DIFF_ONLY="1"
                # LISTCHANGES_PROFILE="apticron"
@@ -415,8 +416,8 @@ rule_user_root_init () {
        mk_lnk etc/gpg /root/.gnupg
        mk_lnk etc/ssh /root/.ssh
        getent group sudo |
-       while test -n "$users" && IFS=: read -r group x x users
-        do while IFS=, read -r user users <<-EOF
+       while IFS=: read -r group x x users
+        do while test -n "$users" && IFS=, read -r user users <<-EOF
                        $users
                        EOF
                 do eval local home\; home="~$user"
@@ -835,7 +836,6 @@ case $rule in
  (help);;
  (*)
        assert 'test "$(hostname --fqdn)" = "$vm_fqdn"' vm_fqdn
-       ${TRACE:+set -x}
        ;;
  esac
 rule $rule "$@"