LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
Search this Thread
Old 02-14-2007, 11:30 AM   #1
kmslinux
LQ Newbie
 
Registered: Feb 2007
Distribution: Kubuntu
Posts: 4

Rep: Reputation: 0
Exporting at boot time on Kubuntu Dapper Drake


While editing bootmisc.sh, I've found that my edit doesn't work. Here's what my full bootmisc looks like.
Code:
#!/bin/sh
### BEGIN INIT INFO
# Provides:          bootmisc
# Required-Start:    $local_fs hostname
# Required-Stop:     $local_fs
# Default-Start:     S
# Default-Stop:
# Short-Description: Miscellaneous things to be done during bootup.
# Description:
### END INIT INFO
#
# Version:      @(#)bootmisc.sh  2.85-17  04-Jun-2004  miquels@cistron.nl
#

[ -z "$DELAYLOGIN" ] && DELAYLOGIN=yes
[ -z "$EDITMOTD" ] && EDITMOTD=yes
[ -f /etc/default/rcS ] && . /etc/default/rcS

do_start () {
        #
        #       Put a nologin file in /etc to prevent people from logging in
        #       before system startup is complete.
        #
        if [ "$DELAYLOGIN" = yes ]
        then
                echo "System bootup in progress - please wait" > /etc/nologin
        fi

        #
        #       Create /var/run/utmp so we can login.
        #
        : > /var/run/utmp
        if grep -q ^utmp: /etc/group
        then
                chmod 664 /var/run/utmp
                chgrp utmp /var/run/utmp
        fi

        #
        #       Set pseudo-terminal access permissions.
        #
        if [ ! -e /dev/.devfsd ] && [ -c /dev/ttyp0 ]
        then
                chmod -f 666 /dev/tty[p-za-e][0-9a-f]
                chown -f root:tty /dev/tty[p-za-e][0-9a-f]
        fi

        #
        #       Update /etc/motd. If it's a symbolic link, do the actual work
        #       in the directory the link points to.
        #
        if [ "$EDITMOTD" != no ]
        then
                MOTD="`readlink -f /etc/motd || :`"
                if [ "$MOTD" != "" ]
                then
                        uname -a > $MOTD.tmp
                        sed 1d $MOTD >> $MOTD.tmp
                        mv $MOTD.tmp $MOTD
                fi
        fi

        #
        #       Save kernel messages in /var/log/dmesg
        #
        if [ -x /bin/dmesg ] || [ -x /sbin/dmesg ]
        then
                dmesg -s 524288 > /var/log/dmesg
        elif [ -c /dev/klog ]
        then
                dd if=/dev/klog of=/var/log/dmesg &
                dmesg_pid=$!
                sleep 1
                kill $dmesg_pid
        fi

        #
        #       Save udev log in /var/log/udev
        #
        if [ -e /dev/.udev.log ]
        then
                mv -f /dev/.udev.log /var/log/udev
        fi


        #
        #       Remove ".clean" files.
        #
        rm -f /tmp/.clean
        export CLASSPATH=/downloads/apache-tomcat-5.5.17/common/lib/servlet-api.jar
        export JAVA_HOME=/downloads/j2sdk1.4.2_13/
        sh /downloads/apache-tomcat-5.5.17/bin/startup.sh
        cd /doomworkspace/
        ant
}

case "$1" in
    start)
        do_start
        ;;
    restart|reload|force-reload)
        echo "Error: argument '$1' not supported" >&2
        exit 3
        ;;
    stop)
        ;;
    *)
        echo "Usage: $0 start|stop" >&2
        exit 3
        ;;
Purple indicates my edit.
 
Old 02-18-2007, 04:35 PM   #2
kmslinux
LQ Newbie
 
Registered: Feb 2007
Distribution: Kubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
Even if you can't help me, just say something so I know that people actually look at this.
 
Old 02-18-2007, 05:02 PM   #3
johngreenwood
Member
 
Registered: Nov 2006
Location: Lancashire, United Kingdom
Distribution: Slackware 13
Posts: 243

Rep: Reputation: 31
something, sorry, I couldn't resist.

I don't know much about scripting, but couldn't you do this somewhere at the beginning of the file
Code:
CLASSPATH=/downloads/apache-tomcat-5.5.17/common/lib/servlet-api.jar
JAVA_HOME=/downloads/j2sdk1.4.2_13/
This is what I usually do to assign a variable in a script. I may be horribly wrong though.

Last edited by johngreenwood; 02-18-2007 at 05:06 PM.
 
Old 02-19-2007, 09:58 AM   #4
kmslinux
LQ Newbie
 
Registered: Feb 2007
Distribution: Kubuntu
Posts: 4

Original Poster
Rep: Reputation: 0
Well, it didn't work. You were close, though. At least you tried.
 
Old 02-19-2007, 10:36 AM   #5
johngreenwood
Member
 
Registered: Nov 2006
Location: Lancashire, United Kingdom
Distribution: Slackware 13
Posts: 243

Rep: Reputation: 31
Oh well, I am sorry I didn't help you, but maybe there is something useful for you here http://tldp.org/LDP/abs/html/
 
  


Reply

Tags
export, kubuntu, ubuntu


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Mounting NTFS windows partition in Kubuntu Dapper Drake Kommari Linux - Hardware 6 04-02-2007 08:56 AM
LXer: Installing Ubuntu/Kubuntu Dapper Drake on a Single/Multi-Boot RAID System LXer Syndicated Linux News 0 02-08-2007 03:21 PM
No sound in Dapper Drake dittyman1 Ubuntu 3 08-27-2006 11:16 AM
Kubuntu 6.06 Dapper hangs often on boot sequence kalahari875 Ubuntu 4 07-08-2006 01:50 PM
Dapper Drake brianthegreat Ubuntu 19 06-06-2006 05:11 AM


All times are GMT -5. The time now is 04:32 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration