~james-page/ubuntu-openstack-ci/drop-tox-from-slave-config

« back to all changes in this revision

Viewing changes to operate/deprecated/826-sources-list-distribute.sh

  • Committer: Ryan Beisner
  • Date: 2018-12-13 21:10:41 UTC
  • mto: This revision was merged to the branch mainline in revision 409.
  • Revision ID: ryan.beisner@canonical.com-20181213211041-5xw4jn4u17ujbv6o
Actually remove the deprecated things

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#!/bin/bash -e
2
 
echo $0
3
 
 
4
 
. $(dirname $0)/../env-common
5
 
 
6
 
f_name="sources.list"
7
 
f_dst_dir="/etc/apt"
8
 
f_dst="${f_dst_dir}/${f_name}"
9
 
f_tmp="${U_HOME}/${f_name}"
10
 
f_src_dir="../populate"
11
 
f_src="${f_src_dir}/${f_name}"
12
 
 
13
 
if [ ! -f "$f_src" ]; then
14
 
  echo "Local source file ${f_src} not found."
15
 
  pwd
16
 
  exit 1
17
 
fi
18
 
 
19
 
for unit in $UNITS; do
20
 
  echo "copying ${f_src} into ${unit}"
21
 
  juju scp $f_src ${unit}:${f_tmp}
22
 
  echo "adjusting permissions and moving $f_tmp to $f_dst"
23
 
  juju ssh $unit "sudo mv $f_tmp $f_dst &&\
24
 
    sudo chown root:root -R ${f_dst} &&\
25
 
    sudo chmod 644 ${f_dst}"
26
 
done