diff --git a/scripts/debian-finish.sh b/scripts/debian-finish.sh index f1c6fb1..04dafda 100644 --- a/scripts/debian-finish.sh +++ b/scripts/debian-finish.sh @@ -66,3 +66,22 @@ cat > /etc/e2fsck.conf <<-__EOF__ broken_system_clock = true __EOF__ + +cat > /etc/init.d/board_tweaks.sh <<-__EOF__ + #!/bin/sh + + if [ -f /boot/uboot/SOC.sh ] ; then + board=\$(cat /boot/uboot/SOC.sh | grep "board" | awk -F"=" '{print \$2}') + case "\${board}" in + BEAGLEBONE_A) + if [ -f /boot/uboot/tools/target/BeagleBone.sh ] ; then + /bin/sh /boot/uboot/tools/target/BeagleBone.sh &> /dev/null & + fi;; + esac + fi + +__EOF__ + +chmod u+x /etc/init.d/board_tweaks.sh +insserv board_tweaks.sh || true + diff --git a/scripts/ubuntu-finish.sh b/scripts/ubuntu-finish.sh index 457df03..20ccb83 100644 --- a/scripts/ubuntu-finish.sh +++ b/scripts/ubuntu-finish.sh @@ -135,3 +135,20 @@ fi __EOF__ +cat > /etc/init/board_tweaks.conf <<-__EOF__ + start on runlevel 2 + + script + if [ -f /boot/uboot/SOC.sh ] ; then + board=\$(cat /boot/uboot/SOC.sh | grep "board" | awk -F"=" '{print \$2}') + case "\${board}" in + BEAGLEBONE_A) + if [ -f /boot/uboot/tools/target/BeagleBone.sh ] ; then + /bin/sh /boot/uboot/tools/target/BeagleBone.sh &> /dev/null & + fi;; + esac + fi + end script + +__EOF__ +