0ed9b3ce28
different sku will be contained in a single one sonic image. no longer need to specify sku at the build time
40 lines
885 B
Bash
Executable File
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
|