Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
30a9cb26
Commit
30a9cb26
authored
Feb 26, 2016
by
Fabio Yeon
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #22083 from zmerlynn/take-out-apt-get
configure-vm.sh: Only "apt-get update" when we need to install a package
parents
fb1ee74e
43cb32ab
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
2 deletions
+16
-2
configure-vm.sh
cluster/gce/configure-vm.sh
+16
-2
No files found.
cluster/gce/configure-vm.sh
View file @
30a9cb26
...
...
@@ -165,6 +165,21 @@ validate-hash() {
}
apt-get-install
()
{
local
-r
packages
=(
$@
)
installed
=
true
for
package
in
"
${
packages
[@]
}
"
;
do
if
!
dpkg
-s
"
${
package
}
"
&>/dev/null
;
then
installed
=
false
break
fi
done
if
[[
"
${
installed
}
"
==
"true"
]]
;
then
echo
"==
${
packages
[@]
}
already installed, skipped apt-get install
${
packages
[@]
}
=="
return
fi
apt-get-update
# Forcibly install packages (options borrowed from Salt logs).
until
apt-get
-q
-y
-o
DPkg::Options::
=
--force-confold
-o
DPkg::Options::
=
--force-confdef
install
$@
;
do
echo
"== install of packages
$@
failed, retrying =="
...
...
@@ -176,7 +191,7 @@ apt-get-update() {
echo
"== Refreshing package database =="
until
apt-get update
;
do
echo
"== apt-get update failed, retrying =="
echo
sleep
5
sleep
5
done
}
...
...
@@ -795,7 +810,6 @@ if [[ -z "${is_push}" ]]; then
set-broken-motd
ensure-basic-networking
fix-apt-sources
apt-get-update
ensure-install-dir
ensure-packages
set-kube-env
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment