This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
sonic-buildimage/files/image_config/platform/rc.local
lguohan b9b7d7a295 [installer]: support platform driver lazy installation (#340)
allow one image to support multiple switch devices, install
corresponding platform driver during the first boot time.
2017-02-27 13:08:41 -08:00

26 lines
581 B
Bash
Executable File

#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.
. /host/machine.conf
echo "install platform dependent packages at the first boot time"
if [ -f /host/platform/firsttime ]; then
if [ -d /host/platform/$onie_platform ]; then
dpkg -i /host/platform/$onie_platform/*.deb
fi
rm /host/platform/firsttime
fi
exit 0