Add new Skeleton.
This commit is contained in:
27
bsp/board/raspberrypi/ovl/etc/init.d/boot
Executable file
27
bsp/board/raspberrypi/ovl/etc/init.d/boot
Executable file
@@ -0,0 +1,27 @@
|
||||
#!/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
|
||||
}
|
||||
Reference in New Issue
Block a user