home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Frozen Fish 1: Amiga
/
FrozenFish-Apr94.iso
/
bbs
/
alib
/
d4xx
/
d497
/
reboot.lha
/
Reboot
/
Reboot.doc
< prev
next >
Wrap
Text File
|
1991-06-06
|
2KB
|
65 lines
Reboot
by Stefan Sticht
PUBLIC DOMAIN
IMPORTANT: Reboot requires Kickstart and Workbench 2.0 (at least
Kickstart 37.*) !!
Reboot resets your Amiga by calling exec's ColdReboot() function.
Template: PROMPT/K,YES/K,TIMEOUT/K/N,QUIET/S
PROMPT: a question which will be prompted first;
default is "Do you really want to reboot (y/N)? "
YES: a string with the positive answer of the above question;
if YES equals (case independant) the user's answer to the
prompting, machine will be resetted after timeout;
default is "y"
pressing only return means answering no
TIMEOUT: any positive decimal number; the seconds to wait before
rebooting; default is 0
QUIET: if this switch is set, no output is made, no prompting done
Some examples:
; -- CUT HERE -- to get a script file
;
; the default behaviour of Reboot:
Reboot PROMPT "Do you really want to reboot (y/N)? " YES "y" TIMEOUT 0
;
Echo "Another one: Rebooting in 10 seconds. Press Ctrl-C to abort!"
; Reboot with QUIET set won't output anything, but it will wait!
Reboot TIMEOUT 10 QUIET
; a german reboot:
Reboot PROMPT "Wollen Sie wirklich neu starten (j/N)? " YES "j" TIMEOUT 10
; end of examples -- CUT HERE --
Return codes:
30: dos.library's or exec.library's version is lesser than 37
20: dos.library's ReadArgs() function returned any error
15: Can't open utility.library V37 or higher
10: String for YES to long!
6: Timeout is negative!
5: User canceled reboot by answering no or pressing Ctrl-C
Send bug-reports, enhancement-requests, questions, gifts(!) to:
---------------------------------------------------------------
Stefan Sticht
Bibereckerweg 40a
D-8390 Passau 18
FRG
or (better) EMail to:
Internet: cbmvax.commodore.com!cbmehq!cbmger!edith!sticht@rutgers.EDU
or: IWSTICHT@ibm.rz.uni-passau.de
Fido-Net: Stefan Sticht (2:242/16:4)