some bash help

Top Page
Attachments:
Message as email
+ (text/plain)
Delete this message
Reply to this message
Author: BoBB
Date:  
Subject: some bash help
OK, this works fine in /etc/profile

[ -f /proc/splash ] && \
        # switch to a usable image on all consoles \
        for TTY in `/usr/bin/seq 0 5`; \
                do /usr/bin/splash -s -u $TTY /usr/share/bootsplash-0.4/console.cfg; \
    done; \

                                    
But I only want this to happen on the first login so I put a line in the
local startup script to set an env variable, SPLASH to yes, and then
added this to /etc/profile

if [ $SPLASH ]
then
        [ -f /proc/splash ] && \
        # switch to a usable image on all consoles \
        for TTY in `/usr/bin/seq 0 5`; \
                do /usr/bin/splash -s -u $TTY /usr/share/bootsplash-0.4/console.cfg; \
        done; \
    export SPLASH=""
fi


But now no matter what SPLASH is set to it doesn't execute the splash
command. I made a test script

#!/bin/bash
if [ $SPLASH ]
then
        echo works
fi

    
and it works as expected, export SPLASH="" causes it to do nothing,
export SPLASH="yes" prints 'works' anyone have any ideas?

--
/* BoBB
* AIM: Jodokast49 ICQ: 151495596
* Jabber:
* http://knightsofchaos.com/~BoBB/new/
*/