Mykola Kostenok | 4d17df6 | 2017-09-01 09:56:45 +0300 | [diff] [blame] | 1 | #!/bin/sh |
| 2 | |
| 3 | echo "---------------- |
| 4 | System entered recovery mode. Running from backup flash!!! |
| 5 | help for get ip: |
| 6 | ifconfig eth0 $IP netmask $NETMASK up; |
| 7 | route add default gw $GATEWAY eth0 |
| 8 | Or type udhcpc to get ip over dhcp. |
| 9 | Please scp image file to /tmp folder and re-burn main flash with: |
| 10 | /run/initramfs/recovery /tmp/<bmc-image-file>. |
| 11 | ----------------"; |
| 12 | |
| 13 | mkdir /run/lock; |
| 14 | |
| 15 | mkdir /dev/mtd; |
| 16 | |
| 17 | ln -s /run/mtd\:u-boot-env /dev/mtd/u-boot-env; |
| 18 | |
| 19 | /usr/bin/mlx-hw-events.sh add reset /sys/devices/platform/ahb/ahb:apb/ahb:apb:i2c@1e78a000/1e78a140.i2c-bus/i2c-4/4-0071/mlxreg-core.1137/hwmon/hwmon*; |
| 20 | |
| 21 | mount /dev/mtdblock5 /run/initramfs/rw -t jffs2 -o remount,ro; |
| 22 | mount tmpfs tmp -t tmpfs -o mode=755,nodev; |
| 23 | |
| 24 | export PS1="(recovery)\u@BMC:\w\$" |
| 25 | |
| 26 | while true; |
| 27 | do |
| 28 | /run/initramfs/ro/sbin/sulogin; |
| 29 | done |
| 30 | |