#!/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