7 div=--------------------------------------
11 echo -n 'Preparing menu...'
13 # must be topologically sorted (by prereq)
25 bootsetup finish stop\
28 # startether startppp stopether stopppp download\
30 # these don't show up in the menu but still matter
31 pseudotasks=(configip havefiles etherup etherdown pppup pppdown)
33 for(i in $tasks $pseudotasks)
38 for(i in $tasks $pseudotasks)
43 # we believe the environment about what is done
44 # only if we've confirmed it. since the tasks list is sorted so that
45 # prereqs of xxx come before xxx, it's okay to assume xxx
46 # is done until proven otherwise -- either a prereq or checkdone
56 for(j in `{prereq $i})
62 $i=`{grep '^'$i^'=' /tmp/vars | sed -n '$p' | sed 's/.*=//'}
65 if(~ $$i notdone ready) {
67 for(j in `{prereq $i})
75 $i=`{grep '^'$i^'=' /tmp/vars | sed -n '$p' | sed 's/.*=//'}
82 $$i=($$$i $i) # rc can be just as complicated as perl!
85 export $tasks $pseudotasks done ready
90 echo 'The following tasks are done: '
96 echo 'The following unfinished tasks are ready to be done:'
102 echo hey you finished everything! not supposed to happen.
107 prompt -d $ready(1) -w '' 'Task to do' $done $ready
113 $rd=done # if it's not, the check will figure that out