You are not logged in.

#1 2005-03-03 11:28:01

wroot
Member
Registered: 2005-02-22
Posts: 26

declare -x at login

Hi, my first post here.

I'vetried to put some additional lines to my PATh in /etc/profile (now i have deleted all my adds). And since then i'm getting this upon every login:
declare -x HOME="/root"
declare -x HUSHLOGIN="FALSE"
etc.

How can i fix that?

And one more question, i'm getting more trash on my login screen every boot. I've put IM server daemon to startup, and it outputs some messages on startup. It's ok, but this lines appears on my login screen after boot is complete. I still can login, but it looks crappy:) I know i can redirect this messages to /dev/null or smth, but i dont know how to do this.

Offline

#2 2005-03-03 15:45:43

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: declare -x at login

What lines did you add to /etc/profile?

What's the name of the daemon you added to the startup?  You have to edit the /etc/rc.d/daemonname file to insert the >/dev/null on the line that starts the program. Theoretically, this should be done for the script anyway, so you may want to file a bug report for that package.

Dusty

Offline

#3 2005-03-03 16:01:36

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: declare -x at login

post the text of your /etc/profile - there's an error in it causing the other lines to balk

Offline

#4 2005-03-04 14:26:25

wroot
Member
Registered: 2005-02-22
Posts: 26

Re: declare -x at login

yes, there was a newline in PATH, i didnt notice it at first (thought it's a wraping:)) So, no it's fine with profile.

and about deamon output. Well, it's not an arch package and just binaries i have extracted to /opt. It has deamon for starting server at boot (btw, it's Jive Messenger server). So, i'll give you source of this daemon, because i'm not sure the to insert this /dev/nulls. Or maybe it's possible to make him act like other arch deamons? I mean, add stat_busy lines and maybe /etc/rc.d/functions to  the top of it. So it will output nice messages in arch style. Dont laugh if i'm totally wrong about this, i'm just a newbie:)

And it would be nice to have Jive Messenger package with pacman of course. because i had to play a lot to make him start correctly (again, because of my newbiezm). I'm just dreaming:)

Code of /etc/rc.d/jive-messengerd (i have inserted this JAVA_HOME at top by myself, because it wouldnt start without this):

#!/bin/sh

export JAVA_HOME=/opt/java/jre

# jive-messengerd
#
# chkconfig: 2345 20 80
# description: Used to start and stop the jive messenger XMPP server
#
# Script used to start jive messenger as daemon
# The script has currently been tested on Redhat Fedora Core 3,
# but should theoretically work on most UNIX like systems
#
# before running this script make sure $MESSENGER_HOME/bin/messenger is
# executable by the user you want to run messenger as
# (chmod +x $MESSENGER_HOME/bin/messenger)
#
# This script should be copied into /etc/init.d and linked into
# your default runlevel directory.
# You can find your default runlevel directory by typing:
# grep default /etc/inittab
#
# Link to the directory like follows
# cd /etc/rc<num>.d
# ln -s ../init.d/jive-messengerd $90jive-messengerd
#

# Set this to tell this script where messenger lives
# If this is not set the script will look for /opt/jive_messenger, then /usr/local/jive_messenger
#export MESSENGER_HOME=

# If there is a different user you would like to run this script as,
# change the following line
export MESSENGER_USER=jive

# -----------------------------------------------------------------

# If a messenger home variable has not been specified, try to determine it
if [ ! $MESSENGER_HOME ]; then
    if [ -d "/opt/jive_messenger" ]; then
        MESSENGER_HOME="/opt/jive_messenger"
    elif [ -d "/usr/local/jive_messenger" ]; then
        MESSENGER_HOME="/usr/local/jive_messenger"
    else
        echo "Could not find Jive Messenger installation under /opt or /usr/local"
        echo "Please specify the Jive Messenger installation location in environment variable MESSENGER_HOME"
        exit 1
    fi
fi


function execCommand() {
    OLD_PWD=`pwd`
    cd $MESSENGER_HOME/bin
    CMD="./messenger $1"
    su -c "$CMD" $MESSENGER_USER &
    cd $OLD_PWD
}


start() {
    execCommand "start"
}

stop() {
    execCommand "stop"
}


case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    *)
        echo "Usage $0 {start|stop}"
        exit 1
esac

exit 0

Offline

#5 2005-03-07 19:30:37

wroot
Member
Registered: 2005-02-22
Posts: 26

Re: declare -x at login

so where do i have to put >/dev/null ?
after execCommand "start" and
execCommand "stop"?
or somethere in next part?
what about state_busy?

Offline

#6 2005-03-07 19:40:41

phrakture
Arch Overlord
From: behind you
Registered: 2003-10-29
Posts: 7,879
Website

Re: declare -x at login

make:
CMD="./messenger $1"
look like:
CMD="./messenger $1 >/dev/null"

Offline

#7 2005-03-07 19:49:09

wroot
Member
Registered: 2005-02-22
Posts: 26

Re: declare -x at login

that's a terrible fast reply :shock:
thanx yikes i'll try it tomorrow

Offline

Board footer

Powered by FluxBB