[rule hosted] +apticron_init
authorLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Tue, 19 Feb 2013 16:08:29 +0000 (17:08 +0100)
committerLudovic CHEVALIER <ludovic.chevalier@heureux-cyclage.org>
Tue, 19 Feb 2013 16:08:29 +0000 (17:08 +0100)
vm_hosted
vm_remote

index bd4d064..0514a43 100755 (executable)
--- a/vm_hosted
+++ b/vm_hosted
@@ -313,6 +313,25 @@ rule__boot_init () {
        sudo update-grub2 # NOTE: prend en compte /boot/grub/device.map
        rule__initramfs_init
  }
        sudo update-grub2 # NOTE: prend en compte /boot/grub/device.map
        rule__initramfs_init
  }
+rule_apticron_init () {
+       sudo apt-get install --reinstall apticron
+       mk_reg mod=644 own=root:root /etc/default/grub <<-EOF
+               EMAIL="admin@heureux-cyclage.org"
+               # DIFF_ONLY="1"
+               # LISTCHANGES_PROFILE="apticron"
+               # ALL_FQDNS="1"
+               # SYSTEM="foobar.example.com"
+               # IPADDRESSNUM="1"
+               # IPADDRESSES="192.0.2.1 2001:db8:1:2:3::1"
+               # NOTIFY_HOLDS="0"
+               # NOTIFY_NEW="0"
+               # NOTIFY_NO_UPDATES="0"
+               # CUSTOM_SUBJECT=""
+               # CUSTOM_NO_UPDATES_SUBJECT=""
+               # CUSTOM_FROM="root@ateliers.heureux-cyclage.org"
+               EOF
+       sudo service apticron restart
+ }
 rule__bin_init () {
        mk_lnk "$tool"/vm_hosted /usr/local/sbin/
  }
 rule__bin_init () {
        mk_lnk "$tool"/vm_hosted /usr/local/sbin/
  }
index 237f421..02b9540 100755 (executable)
--- a/vm_remote
+++ b/vm_remote
@@ -79,7 +79,7 @@ case $rule in
  (*)
        test ! "$(hostname --fqdn)" = "$vm_fqdn"
        test ! "$(hostname --fqdn)" = "$vm_host"
  (*)
        test ! "$(hostname --fqdn)" = "$vm_fqdn"
        test ! "$(hostname --fqdn)" = "$vm_host"
-       set "${TRACE:+-x}"
+       set -x
        ;;
  esac
 rule_$rule "$@"
        ;;
  esac
 rule_$rule "$@"