~doanac/utah/rsyslog-v4

« back to all changes in this revision

Viewing changes to templates/utah-latecommand-in-target.jinja2

  • Committer: Javier Collado
  • Date: 2013-02-27 16:10:59 UTC
  • mfrom: (822.1.14 bug1126115)
  • Revision ID: javier.collado@canonical.com-20130227161059-y4brif9rhbrt68v2
Added success command failure detection (LP: #1126115)

Source branch: lp:~javier.collado/utah/wrap-latecommand

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/sh
 
2
set -e
 
3
{% from "install-commands.jinja2" import install_commands -%}
 
4
{{ install_commands(packages, log_file) }}
 
5
 
 
6
log "Adding installation commands to rc.local..."
 
7
sed -i -e '/^exit 0$/i\
 
8
{# Escape backslashes and add new ones for each line to make sed command work -#}
 
9
{{ install_commands(packages, log_file) |
 
10
    replace('\\', '\\\\') |
 
11
    add_backslash }}
 
12
' /etc/rc.local