mirror of
https://github.com/flatcar/scripts.git
synced 2025-09-22 06:01:41 +02:00
chore(*): use COREOS lsb-release variables
use the COREOS_ variables in /etc/lsb-release
This commit is contained in:
parent
ad32826cbd
commit
b9568f9dce
@ -600,7 +600,7 @@ def main(argv):
|
|||||||
rel = cros_env.GetRemoteRelease()
|
rel = cros_env.GetRemoteRelease()
|
||||||
if not rel:
|
if not rel:
|
||||||
cros_env.Fatal('Could not retrieve remote lsb-release')
|
cros_env.Fatal('Could not retrieve remote lsb-release')
|
||||||
board = rel.get('CHROMEOS_RELEASE_BOARD', '(None)')
|
board = rel.get('COREOS_RELEASE_BOARD', '(None)')
|
||||||
if not options.board:
|
if not options.board:
|
||||||
options.board = board
|
options.board = board
|
||||||
elif board != options.board and not options.force_mismatch:
|
elif board != options.board and not options.force_mismatch:
|
||||||
|
@ -66,11 +66,4 @@ COREOS_RELEASE_TRACK=$COREOS_VERSION_TRACK
|
|||||||
COREOS_RELEASE_VERSION=$COREOS_VERSION_STRING
|
COREOS_RELEASE_VERSION=$COREOS_VERSION_STRING
|
||||||
COREOS_AUSERVER=$COREOS_VERSION_AUSERVER
|
COREOS_AUSERVER=$COREOS_VERSION_AUSERVER
|
||||||
COREOS_DEVSERVER=$COREOS_VERSION_DEVSERVER
|
COREOS_DEVSERVER=$COREOS_VERSION_DEVSERVER
|
||||||
CHROMEOS_RELEASE_BOARD=$FLAGS_board
|
|
||||||
CHROMEOS_RELEASE_DESCRIPTION=$COREOS_VERSION_DESCRIPTION
|
|
||||||
CHROMEOS_RELEASE_NAME=$COREOS_VERSION_NAME
|
|
||||||
CHROMEOS_RELEASE_TRACK=$COREOS_VERSION_TRACK
|
|
||||||
CHROMEOS_RELEASE_VERSION=$COREOS_VERSION_STRING
|
|
||||||
CHROMEOS_AUSERVER=$COREOS_VERSION_AUSERVER
|
|
||||||
CHROMEOS_DEVSERVER=$COREOS_VERSION_DEVSERVER
|
|
||||||
EOF
|
EOF
|
||||||
|
@ -9,4 +9,4 @@
|
|||||||
|
|
||||||
echo "Modifying Release Track for Test (testimage-channel)."
|
echo "Modifying Release Track for Test (testimage-channel)."
|
||||||
FILE="${ROOT_FS_DIR}/etc/lsb-release"
|
FILE="${ROOT_FS_DIR}/etc/lsb-release"
|
||||||
sed -i 's/^\(CHROMEOS_RELEASE_TRACK=\).*/\1testimage-channel/' $FILE
|
sed -i 's/^\(COREOS_RELEASE_TRACK=\).*/\1testimage-channel/' $FILE
|
||||||
|
@ -128,7 +128,7 @@ set_up_remote_access() {
|
|||||||
# Ask the target what board it is
|
# Ask the target what board it is
|
||||||
learn_board() {
|
learn_board() {
|
||||||
[ -n "${FLAGS_board}" ] && return
|
[ -n "${FLAGS_board}" ] && return
|
||||||
remote_sh -n grep CHROMEOS_RELEASE_BOARD /etc/lsb-release
|
remote_sh -n grep COREOS_RELEASE_BOARD /etc/lsb-release
|
||||||
FLAGS_board=$(echo "${REMOTE_OUT}" | cut -d '=' -f 2)
|
FLAGS_board=$(echo "${REMOTE_OUT}" | cut -d '=' -f 2)
|
||||||
if [ -z "${FLAGS_board}" ]; then
|
if [ -z "${FLAGS_board}" ]; then
|
||||||
error "Board required"
|
error "Board required"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user