Files
domo/bsp/board/raspberrypi/ovl/etc/init.d/boot
2016-11-16 22:04:31 +01:00

28 lines
726 B
Bash
Executable File

#!/bin/sh /etc/rc.common
#
START=10
STOP=98
boot() {
mount -a
ConfigState=`fw_printenv is_configured | cut -d'=' -f2`
if [ "$ConfigState" = "0" ]; then
echo "Reset the Device Name to Factory."
mkdir -p /mnt/user/UserSettings/
rm /mnt/user/UserSettings/*
/usr/local/bin/Device_Name mediaCTRLRenderer.ini mediaCTRLServer.ini SlavePlayer.ini
fw_setenv is_configured 1
fi
# Set our device Hostname using the friendlyName
friendlyname=`cat /usr/local/configs/mediaCTRLRenderer.ini | grep friendlyname | cut -f2 -d'='`
mac=`fw_printenv ethaddr | cut -f4-6 -d':' | sed s/://g`
hostname $friendlyname-$mac
echo Device hostname is `hostname`
# Temporary Hack
ifconfig lo up
ifconfig eth0 up
udhcpc -i eth0
}