]> git.madduck.net Git - code/vinst.git/blob - preseed/wheezy/commands/late_commands.d/install_salt_backport

madduck's git repository

Every one of the projects in this repository is available at the canonical URL git://git.madduck.net/madduck/pub/<projectpath> — see each project's metadata for the exact URL.

All patches and comments are welcome. Please squash your changes to logical commits before using git-format-patch and git-send-email to patches@git.madduck.net. If you'd read over the Git project's submission guidelines and adhered to them, I'd be especially grateful.

SSH access, as well as push access can be individually arranged.

If you use my repositories frequently, consider adding the following snippet to ~/.gitconfig and using the third clone URL listed for each project:

[url "git://git.madduck.net/madduck/"]
  insteadOf = madduck:

import jessie preseed
[code/vinst.git] / preseed / wheezy / commands / late_commands.d / install_salt_backport
1 #!/bin/sh
2
3 TMPLIST=/etc/apt/sources.list.d/tmp-backports.list
4
5 echo "Temporarily enabling backports"
6 sed -ne 's/-updates/-backports/p' /etc/apt/sources.list > $TMPLIST
7
8 SUITE=$(tail -1 $TMPLIST | cut -d' ' -f3)
9 SUITE=${SUITE%-*}
10
11 cat <<_eof >> $TMPLIST
12 deb http://debian.saltstack.com/debian ${SUITE}-saltstack main
13 _eof
14
15 cd /tmp
16 wget -O salt.gpg http://debian.saltstack.com/debian-salt-team-joehealy.gpg.key
17 echo "145157dfb896f7a0c1f390c6f72e6d092fbbfaf4374b510d4c7828c4177ab476  salt.gpg" | sha256sum -c || exit 1
18 apt-key --keyring /etc/apt/trusted.gpg.d/salt.gpg add salt.gpg && rm salt.gpg
19
20 apt-get update
21
22 rm -f /etc/apt/trusted.gpg.d/salt.gpg
23
24 TMPCONF=/etc/default/salt-minion
25
26 echo "exit 0" > $TMPCONF
27
28 echo "Installing Salt minion (possibly from $SUITE-backports and $SUITE-saltstack)"
29 export DEBCONF_FRONTEND=noninteractive
30 apt-get install --no-install-recommends -t $SUITE-saltstack -y salt-minion
31
32 echo "pki_dir: /var/lib/salt/minion/pki" > /etc/salt/minion.d/tmp-pki-in-varlib.conf
33
34 rm -f $TMPLIST $TMPCONF