#!/bin/ash if grep -q nocrest /proc/cmdline then echo "*NO* CREST MODE!" else rm /tmp/crestauth if [ `stat -c '%h' /.crestcache/.crestfs_pending_writes` -eq 2 ] then if [ `stat -c '%h' /.crestcache/.crestfs_pending_directories` -gt 2 ] then echo "CREST-fs File System Inconsistency detected, repairing" rm /.crestcache/.crestfs_pending_directories/* read -p "Press Return to Continue, and mount filesystem!" ignored fi fi mv bin newbin /newbin/busybox mkdir bin /newbin/busybox cp /newbin/busybox /bin/mount /newbin/busybox insmod fuse #/newbin/busybox mknod /dev/fuse c 10 229 #TZ=EST5EDT if /newbin/busybox grep debugcrest /proc/cmdline then echo "DEBUG CREST MODE!" crestfs /http /.crestcache 60 /tmp/crestauth -s -d -f 1>/tmp/1.out 2>/tmp/2.out & /newbin/busybox echo "sleeping 3 seconds for debug version" /newbin/busybox sleep 3 else echo "PLAIN CREST MODE!" crestfs /http /.crestcache 60 /tmp/crestauth fi /newbin/busybox echo "Is crest stuff mounted now?" /newbin/busybox rm -r /bin /newbin/busybox mv /newbin /bin fi #sleep 15 echo "Freaky. Well, crestfs is now mounted. OK?"