Last change
on this file since 678 was 378, checked in by andree, 19 years ago |
Made it so that wait-for-petris picks the correct linker for the
architecture at hand rather than just looking for /lib/ld-linux.so.2
which only exists on i386. This fixes calling petris on amd64 (and
hopefully on ia64, too).
|
-
Property svn:keywords
set to
Id
|
File size:
786 bytes
|
Rev | Line | |
---|
[1] | 1 | #!/bin/sh
|
---|
| 2 | #
|
---|
| 3 | # Startup Petris
|
---|
| 4 | #
|
---|
| 5 |
|
---|
| 6 | # Say what we are doing
|
---|
| 7 | echo -n "Waiting for petris"
|
---|
[378] | 8 | # Get the right linker for architecture
|
---|
| 9 | arch=`uname -m`
|
---|
| 10 | case $arch in
|
---|
| 11 | 'ia64')
|
---|
| 12 | linker="/lib/ld-linux-ia64.so.2" ;;
|
---|
| 13 | 'x86_64')
|
---|
| 14 | linker="/lib/ld-linux-x86-64.so.2" ;;
|
---|
| 15 | *)
|
---|
| 16 | # we only run on the above two and IA32, so this must be it
|
---|
| 17 | linker="/lib/ld-linux.so.2" ;;
|
---|
| 18 | esac
|
---|
[1] | 19 | # First wait for the libraries to become available...
|
---|
[378] | 20 | while [ ! -f /lib/libncurses.so.5 -o ! -f /lib/libc.so.6 -o ! -f "$linker" ] ; do
|
---|
[1] | 21 | echo -n "."
|
---|
| 22 | sleep 1
|
---|
| 23 | done
|
---|
| 24 | # ...then wait for petris
|
---|
| 25 | which petris > /dev/null
|
---|
| 26 | while [ $? -ne 0 ] ; do
|
---|
| 27 | echo -n "."
|
---|
| 28 | sleep 1
|
---|
| 29 | which petris > /dev/null
|
---|
| 30 | done
|
---|
| 31 | # Keep running petris until it's killed or crashes
|
---|
| 32 | while [ $? -eq 0 ] ; do
|
---|
| 33 | clear
|
---|
| 34 | sleep 1
|
---|
| 35 | petris
|
---|
| 36 | done
|
---|
| 37 | exit 0
|
---|
Note:
See
TracBrowser
for help on using the repository browser.