X-Git-Url: http://git.rohieb.name/openwrt.git/blobdiff_plain/c31ac521e420aa0cfd3ddbc0859b29b0e2a3ff3e..8e8fb0083c72cdd06d1b4799aedeb75130eb24ee:/target/default/target_skeleton/bin/firstboot?ds=inline diff --git a/target/default/target_skeleton/bin/firstboot b/target/default/target_skeleton/bin/firstboot index 5076d1c18..cef258cf3 100755 --- a/target/default/target_skeleton/bin/firstboot +++ b/target/default/target_skeleton/bin/firstboot @@ -1,6 +1,11 @@ #!/bin/sh # $Id$ +mount | grep squashfs >&- || { + echo "You do not have a squashfs partition; aborting" + echo "(firstboot cannot be run on jffs2 based firmwares)" + return +} [ -f "/tmp/.firstboot" ] && { echo "firstboot is already running" @@ -37,7 +42,11 @@ echo "done" echo -n "setting up symlinks... " for file in $(cd /rom; find * -type f; find * -type l;) do { - ln -sf /rom/$file $file + [ "${file%/*}" = "usr/lib/ipkg/info" ] && { + cp -f /rom/$file $file + } || { + ln -sf /rom/$file $file + } } done echo "done"