Polissage.
[lhc/ateliers.git] / vm_hosted
index 7934de6..847b818 100755 (executable)
--- a/vm_hosted
+++ b/vm_hosted
@@ -1,8 +1,9 @@
 #!/bin/sh
 set -e -f ${DRY_RUN:+-n} -u
 tool=${0%/*}
-. "$tool"/lib/functions.sh
+. "$tool"/lib/rule.sh
 . "$tool"/etc/vm.sh
+. "$tool"/lib/mk.sh
 
 rule_help () { # SYNTAX: [--hidden]
        local hidden; [ ${1:+set} ] || hidden=set
@@ -90,10 +91,10 @@ rule_apticron_configure () {
                # CUSTOM_NO_UPDATES_SUBJECT=""
                # CUSTOM_FROM="root@ateliers.heureux-cyclage.org"
                EOF
-       sudo service apticron restart
  }
 rule_boot_configure () {
-       rule apt_get_install grub-pc # XXX: attention à n'installer GRUB sur AUCUN disque proposé !
+       warn "attention à n'installer GRUB sur AUCUN disque proposé !"
+       rule apt_get_install grub-pc
        mk_dir mod=644 own=root:root /boot/grub
        rule apt_get_install linux-image-$vm_arch
        mk_reg mod=644 own=root:root /etc/default/grub <<-EOF
@@ -448,10 +449,11 @@ rule_configure () {
        rule login_configure
        rule user_root_configure
        rule boot_configure
+       rule apticron_configure
        rule bin_configure
  }
 
-rule_disk_key_change () {
+rule_luks_key_change () {
        sudo cryptsetup luksChangeKey /dev/$vm_lvm_vg/${vm_lvm_lv}_root
  }