mirror of
https://github.com/Telecominfraproject/OpenCellular.git
synced 2025-12-07 16:35:44 +00:00
image_signing: do not fail when chronos does not exist
If the device doesn't create a chronos user, don't throw errors. For some embedded systems, they don't need a chronos user. BRANCH=None BUG=chromium:714598 TEST=signing images still works Change-Id: I4604beae1e647e024a04583471b8a7d0d4f188fa Reviewed-on: https://chromium-review.googlesource.com/500027 Commit-Ready: Mike Frysinger <vapier@chromium.org> Tested-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: David Riley <davidriley@chromium.org>
This commit is contained in:
committed by
chrome-bot
parent
0dfff398fc
commit
f68d76c1cd
@@ -365,7 +365,10 @@ ensure_files_exist() {
|
||||
# Args: rootfs
|
||||
no_chronos_password() {
|
||||
local rootfs=$1
|
||||
sudo grep -q '^chronos:\*:' "$rootfs/etc/shadow"
|
||||
# Make sure the chronos user actually exists.
|
||||
if grep -qs '^chronos:' "${rootfs}/etc/passwd"; then
|
||||
sudo grep -q '^chronos:\*:' "${rootfs}/etc/shadow"
|
||||
fi
|
||||
}
|
||||
|
||||
trap "cleanup_temps_and_mounts" EXIT
|
||||
|
||||
Reference in New Issue
Block a user