sonic-buildimage/files/image_config/platform/rc.local
lguohan 0ed9b3ce28 [platform]: remove sku from build parameter (#350)
different sku will be contained in a single one sonic image.
no longer need to specify sku at the build time
2017-03-01 17:05:13 -08:00

40 lines
885 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 [ -n $aboot_platform ]; then
platform=$aboot_platform
elif [ -n $onie_platform ]; then
platform=$onie_platform
else
echo "Unknown sonic platform"
rm /host/platform/firsttime
exit 0
fi
cp /usr/share/sonic/device/$platform/minigraph.xml /etc/sonic/
if [ -d /host/platform/$platform ]; then
dpkg -i /host/platform/$platform/*.deb
fi
rm /host/platform/firsttime
fi
exit 0