add K* scripts to be run at shutdown
[openwrt.git] / package / base-files / files / etc / functions.sh
index dac46a3..86ea82d 100755 (executable)
@@ -186,3 +186,13 @@ strtok() { # <string> { <variable> [<separator>] ... }
 
        return $count
 }
+
+
+jffs2_mark_erase() {
+       local part="$(find_mtd_part "$1")"
+       [ -z "$part" ] && {
+               echo Partition not found.
+               return 1
+       }
+       echo -e "\xde\xad\xc0\xde" | mtd -qq write - "$1"
+}