Added dpkg locked check and install cleanup.
This commit is contained in:
parent
48cc918251
commit
aa90f1e34e
1 changed files with 17 additions and 2 deletions
|
@ -1,13 +1,28 @@
|
||||||
function unsafeUpdate() {
|
function unsafeUpdate() {
|
||||||
|
|
||||||
|
echo "Running user updates."
|
||||||
|
|
||||||
|
# Clean up after installation.
|
||||||
|
if [[ -f install.sh ]]; then
|
||||||
|
rm install.sh
|
||||||
|
fi
|
||||||
|
if [[ -d chromebook-linux ]]; then
|
||||||
|
rm -rf chromebook-linux
|
||||||
|
fi
|
||||||
|
|
||||||
# Additional updates that require 'user'.
|
# Additional updates that require 'user'.
|
||||||
true
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function unsafeUpdateRoot() {
|
function unsafeUpdateRoot() {
|
||||||
|
|
||||||
|
echo "Running root updates."
|
||||||
|
|
||||||
# Handle system updates.
|
# Handle system updates.
|
||||||
|
while : ; do
|
||||||
apt-get update
|
apt-get update
|
||||||
|
[[ $? -ne 0 ]] || break
|
||||||
|
done
|
||||||
apt-get -fy upgrade
|
apt-get -fy upgrade
|
||||||
apt-get -fy dist-upgrade
|
apt-get -fy dist-upgrade
|
||||||
apt-get -fy autoremove
|
apt-get -fy autoremove
|
||||||
|
|
Loading…
Add table
Reference in a new issue