mirror of
https://github.com/flatcar/scripts.git
synced 2025-08-08 13:36:58 +02:00
Nothing in the tree needs libcros anymore, so as a precursor to removing that package, drop the root check on its version info. BUG=chromium-os:15922 TEST=`cbuildbot arm-generic-full` works TEST=`cbuildbot x86-generic-full` works Change-Id: I03668c6dbb4cb79dbadb0c98e3c05dca01a8045d Reviewed-on: https://gerrit.chromium.org/gerrit/18247 Reviewed-by: Chris Masone <cmasone@chromium.org> Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org>
47 lines
949 B
Bash
Executable File
47 lines
949 B
Bash
Executable File
#!/bin/bash
|
|
|
|
# Copyright (c) 2012 The Chromium OS Authors. All rights reserved.
|
|
# Use of this source code is governed by a BSD-style license that can be
|
|
# found in the LICENSE file.
|
|
|
|
SCRIPT_ROOT=$(readlink -f $(dirname "$0")/..)
|
|
. "${SCRIPT_ROOT}/common.sh" || exit 1
|
|
|
|
# We're invoked only by build_image, which runs in the chroot
|
|
assert_inside_chroot
|
|
|
|
# Flags
|
|
DEFINE_string root "" \
|
|
"The root file system to check."
|
|
|
|
# Parse command line
|
|
FLAGS "$@" || exit 1
|
|
eval set -- "${FLAGS_ARGV}"
|
|
|
|
# Die on any errors
|
|
set -e
|
|
|
|
# Check all parts of a pipe
|
|
set -o pipefail
|
|
|
|
ROOT="$FLAGS_root"
|
|
if [[ ! -d "$ROOT" ]]; then
|
|
die "Root FS does not exist ($ROOT)"
|
|
fi
|
|
|
|
BINARIES="$ROOT/usr/bin/Xorg
|
|
$ROOT/boot/vmlinuz
|
|
$ROOT/sbin/session_manager
|
|
$ROOT/bin/sed
|
|
$ROOT/opt/google/chrome/chrome"
|
|
|
|
EXITCODE=0
|
|
for i in $BINARIES; do
|
|
if ! [[ -f $i ]]; then
|
|
error "cannot find $i"
|
|
EXITCODE=1
|
|
fi
|
|
done
|
|
|
|
exit $EXITCODE
|