diff --git a/device/dell/x86_64-dell_s6000_s1220-r0/installer.conf b/device/dell/x86_64-dell_s6000_s1220-r0/installer.conf index eb135bee0ff1..a8fef6185912 100644 --- a/device/dell/x86_64-dell_s6000_s1220-r0/installer.conf +++ b/device/dell/x86_64-dell_s6000_s1220-r0/installer.conf @@ -1,5 +1,7 @@ ONIE_PLATFORM_EXTRA_CMDLINE_LINUX="processor.max_cstate=1 intel_idle.max_cstate=0" +if [ "$install_env" = "onie" ]; then + echo "Replace ONIE reboot with Dell reset commands" # set I2C GPIO mux @@ -21,3 +23,5 @@ i2cset -y 0 0x31 1 0xfd EOF chmod a+x /sbin/reboot + +fi diff --git a/installer/x86_64/install.sh b/installer/x86_64/install.sh index 18669893bcb5..f7d1dbb29a6f 100755 --- a/installer/x86_64/install.sh +++ b/installer/x86_64/install.sh @@ -36,7 +36,14 @@ if [ $(id -u) -ne 0 ] fi # get running machine from conf file -[ -r /etc/machine.conf ] && . /etc/machine.conf +if [ -r /etc/machine.conf ]; then + . /etc/machine.conf +elif [ -r /host/machine.conf ]; then + . /host/machine.conf +else + echo "cannot find machine.conf" + exit 1 +fi echo "onie_platform: $onie_platform" @@ -57,9 +64,10 @@ if [ -d "/etc/sonic" ]; then else echo "Installing SONiC in ONIE" install_env="onie" - [ -r platforms/$onie_platform ] && source platforms/$onie_platform fi +[ -r platforms/$onie_platform ] && . platforms/$onie_platform + # Install demo on same block device as ONIE onie_dev=$(blkid | grep ONIE-BOOT | head -n 1 | awk '{print $1}' | sed -e 's/:.*$//') blk_dev=$(echo $onie_dev | sed -e 's/[1-9][0-9]*$//' | sed -e 's/\([0-9]\)\(p\)/\1/')