Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
adam.huang
Config
Commits
2a67d66f
Commit
2a67d66f
authored
Apr 17, 2018
by
Igor Pecovnik
Browse files
Switch to stable builds also reinstall armbian packages
parent
85ed150a
Changes
1
Show whitespace changes
Inline
Side-by-side
debian-config-jobs
100644 → 100755
View file @
2a67d66f
...
@@ -1063,21 +1063,46 @@ function jobs ()
...
@@ -1063,21 +1063,46 @@ function jobs ()
;;
;;
# Switch to stable builds
# Switch to stable builds
and reinstall armbian packages
#
#
"Stable"
)
"Stable"
)
if
!
is_package_manager_running
;
then
if
!
is_package_manager_running
;
then
dialog
--colors
--title
"
\Z
1Warning
\Z
0 "
--backtitle
"
$BACKTITLE
"
--yes-label
"OK"
--no-label
"Cancel"
\
dialog
--colors
--title
"
\Z
1Warning
\Z
0 "
--backtitle
"
$BACKTITLE
"
--yes-label
"OK"
\
--yesno
"
\n
You are switching back to stable respository where you are going to get future updates. Are you fine with that?"
9 44
--no-label
"Cancel"
--yesno
\
"
\n
You are switching back to stable respository where you are going to get future updates. Are you fine with that?"
9 44
if
[[
$?
=
0
]]
;
then
if
[[
$?
=
0
]]
;
then
sed
-i
's/beta.armbian.com/apt.armbian.com/'
/etc/apt/sources.list.d/armbian.list
sed
-i
's/beta.armbian.com/apt.armbian.com/'
/etc/apt/sources.list.d/armbian.list
debconf-apt-progress
--
apt-get update
debconf-apt-progress
--
apt-get update
debconf-apt-progress
--
apt-get
-y
upgrade
# remove nighlty packages and install stable
TARGET_BRANCH
=
$BRANCH
exceptions
"
$INSTALL_KERNEL
"
dialog
--backtitle
"
$BACKTITLE
"
--title
"Please wait"
--infobox
"
\n
Removing current nightly kernel."
5 36
apt-get
-s
-y
-qq
--no-install-recommends
install
linux-image
${
TARGET_BRANCH
}
-
${
TARGET_FAMILY
}
\
linux-headers
${
TARGET_BRANCH
}
-
${
TARGET_FAMILY
}
linux-u-boot-
${
BOARD
}
-
${
UBOOT_BRANCH
}
\
linux-
$(
lsb_release
-cs
)
-root
$TARGET_BRANCH
-
$BOARD
>
/dev/null 2>&1
# if test download is ok, remove old kernel
if
[[
$?
=
0
]]
;
then
aptitude remove ~nlinux-image
--quiet
=
100
-y
>>
/var/log/upgrade.log
aptitude remove ~nlinux-dtb
--quiet
=
100
-y
>>
/var/log/upgrade.log
aptitude remove ~nlinux-headers
--quiet
=
100
-y
>>
/var/log/upgrade.log
aptitude remove ~nlinux-
$(
lsb_release
-cs
)
-root
--quiet
=
100
-y
>>
/var/log/upgrade.log
fi
# install new packages
INSTALL_DTB
=
""
[[
-n
$(
apt-cache search
--names-only
"^linux-dtb
$TARGET_BRANCH
-
$TARGET_FAMILY
"
)
]]
&&
\
INSTALL_DTB
=
"linux-dtb
$TARGET_BRANCH
-
$TARGET_FAMILY
"
debconf-apt-progress
--
apt-get
--reinstall
-o
Dpkg::Options::
=
"--force-confdef"
-o
Dpkg::Options::
=
"--force-confold"
\
-y
-qq
--no-install-recommends
install
linux-image
${
TARGET_BRANCH
}
-
${
TARGET_FAMILY
}
\
linux-headers
${
TARGET_BRANCH
}
-
${
TARGET_FAMILY
}
linux-u-boot-
${
BOARD
}
-
${
UBOOT_BRANCH
}
\
linux-
$(
lsb_release
-cs
)
-root
$TARGET_BRANCH
-
$BOARD
$INSTALL_DTB
dialog
--title
"Switching to stable"
--backtitle
"
$BACKTITLE
"
--yes-label
"Reboot"
--no-label
"Cancel"
--yesno
\
dialog
--title
"Switching to stable"
--backtitle
"
$BACKTITLE
"
--yes-label
"Reboot"
--no-label
"Cancel"
--yesno
\
"
\n
Reboot to apply new settings?"
7 34
"
\n
Reboot to apply new settings?"
7 34
if
[[
$?
=
0
]]
;
then
reboot
;
fi
if
[[
$?
=
0
]]
;
then
reboot
;
fi
fi
fi
fi
fi
;;
;;
# Switch to alternative kernels
# Switch to alternative kernels
...
...
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