blob: 82aa9989a68a8bca4c984e1b64154a1787a6be3d [file] [log] [blame]
#!/bin/busybox sh
# Copyright 2015 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.
#
# /init script for use in factory netboot installer.
# Note that this script uses the busybox shell (not bash, not dash).
set -x
. /lib/init.sh
setup_environment() {
initialize
# Install additional utility programs.
/bin/busybox --install /bin || true
}
main() {
setup_environment
# In case an error is not handled by factory installer itself, stop here
# so that an operator can see installation stop.
factory_shim_service.sh || sleep 1d
}
# Make this source-able for testing.
if [ "$0" = "/init" ]; then
main "$@"
# Should never reach here.
exit 1
fi