Skip to content

Commit

Permalink
avoid duplicated modifications on apt.conf
Browse files Browse the repository at this point in the history
Signed-off-by: ywang19 <[email protected]>
  • Loading branch information
ywang19 committed Apr 21, 2016
1 parent 74a6181 commit ca24318
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions ubuntu14/install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,9 @@ EOF
$SSH $USER@$1 "bash -x -s" <<EOF
$SUDO rm -f /tmp/apt.conf
test -f /etc/apt/apt.conf && $SUDO mv /etc/apt/apt.conf /tmp
echo "APT::Get::AllowUnauthenticated 1 ;" | $SUDO tee --append /tmp/apt.conf >/dev/null
if [ `grep "APT::Get::AllowUnauthenticated" /etc/apt/apt.conf |wc -l` -eq 0 ]; then
echo "APT::Get::AllowUnauthenticated 1 ;" | $SUDO tee --append /tmp/apt.conf >/dev/null
fi
$SUDO mv /tmp/apt.conf /etc/apt
EOF
# $SCP apt.conf $USER@$1:/etc/apt
Expand All @@ -305,7 +307,9 @@ function set_local_repo() {
$SUDO cp -r vsmrepo /opt
$SUDO rm -f /tmp/apt.conf
test -f /etc/apt/apt.conf && $SUDO mv /etc/apt/apt.conf /tmp
echo "APT::Get::AllowUnauthenticated 1 ;" | $SUDO tee --append /tmp/apt.conf >/dev/null
if [ `grep "APT::Get::AllowUnauthenticated" /etc/apt/apt.conf |wc -l` -eq 0 ]; then
echo "APT::Get::AllowUnauthenticated 1 ;" | $SUDO tee --append /tmp/apt.conf >/dev/null
fi
$SUDO mv /tmp/apt.conf /etc/apt
$SUDO cp vsm.list /etc/apt/sources.list.d
$SUDO cp vsm-dep.list /etc/apt/sources.list.d
Expand Down

0 comments on commit ca24318

Please sign in to comment.