• My Screwey Ass Linux Box

    From KK4QBN@1:103/705 to All on Tue Apr 17 20:31:08 2018
    A couple months ago, I had an issue crop up to where the SBBSCTRL var and others "LD_LIBRARY_PATH I think" would not export to the system to be read by SBBS, I've set it up in /etc/profile, ~/.profile ~/.bashrc, and even in script files that will try to set the env variable and then run lets say SBBS, or SCFG. Because if I did not do this, when I would run SBBS it would state:

    !SBBSCTRL not set, using default /sbbs/ctrl or something to that point.

    and programs like SCFG would state /sbbs/ctrl/main.cnf missing or other errors. jsexec would not run on the cmdline, it would ask for the SBBSCTRL env.

    Rob (DM) and I went back and forth a few times on email about this, and never really could figure out what was going on, then all of a sudden it started working without issue.

    Here I am a couple months later, I have not touced ANY of my rc, profile, or any other . files, and it is happening again.. right out of the blue..

    I don't understand this shit..

    SCFG:

    ......................................................................... ...[.]...................................................................
    ... Main configuration file (/home/kk4qbn/sbbs/exec/main.cnf) missing! .. .........................................................................
    ... .OK .. ......................................................................... .........................................................................

    I have my SBBSCTRL env var set to /sbbs/ctrl, notice it is trying to load from the bbs users home directory. even though I am running scfg, and all other programs from the symlinked dir /sbbs/exec.

    Maybe I should pull all the export commands out of my config files in the bbs users home dir?

    attempt to run jsexec from /sbbs/exec:

    kk4qbn@kk4qbn:/sbbs/exec$ ./jsexec

    SBBSCTRL environment variable not set and -c option not specified.

    Example: SET SBBSCTRL=/sbbs/ctrl

    or: ./jsexec -c /sbbs/ctrl [module]

    Returning error code: 1
    kk4qbn@kk4qbn:/sbbs/exec$


    I can create scripts to run lets say scfg and jsexec like shown below, and they load correctly.

    #!/bin/sh
    cd /sbbs/exec
    SBBSCTRL=/sbbs/ctrl && export SBBSCTRL
    LD_LIBRARY_PATH=/sbbs/exec && export LD_LIBRARY_PATH
    ./scfg
    exit


    BUT, when I create a script the exact same way to run SBBS, as sbbs is loading it will give the error !SBBSCTRL environment not found using /sbbs/ctrl (typing from memory).

    Why does it do this? if the script runs scfg correctly with no errors, why not sbbs?

    strange indeed..

    I believe as I stated I will delete all mentions of SBBS in my home rc files and leave the ones in my /etc dirs and see what happens but for it to just all of a sudden revert back to doing this again is strange as balls.. I have done nothing to make a difference, all I have done lately is customize my BBS textfiles and doorgames..

    If anything jumps out at anyone. please let me know.

    tia..

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    ---
    * Synchronet * KK4QBN BBS - kk4qbn.com - 706.422.9538 - EM74OR - NW GA USA
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to KK4QBN on Tue Apr 17 18:50:25 2018
    Re: My Screwey Ass Linux Box
    By: KK4QBN to All on Tue Apr 17 2018 08:31 pm

    A couple months ago, I had an issue crop up to where the SBBSCTRL var and others "LD_LIBRARY_PATH I think" would not export to the system to be read by SBBS, I've set it up in /etc/profile, ~/.profile ~/.bashrc, and even in script files that will try to set the env variable and then run lets say SBBS, or SCFG. Because if I did not do this, when I would run SBBS it would state:

    !SBBSCTRL not set, using default /sbbs/ctrl or something to that point.

    and programs like SCFG would state /sbbs/ctrl/main.cnf missing or other errors. jsexec would not run on the cmdline, it would ask for the SBBSCTRL env.

    Rob (DM) and I went back and forth a few times on email about this, and never really could figure out what was going on, then all of a sudden it started working without issue.

    Here I am a couple months later, I have not touced ANY of my rc, profile, or any other . files, and it is happening again.. right out of the blue..

    I don't understand this shit..

    I think the main point you fail to grasp there are *multiple* environments at any time on the system. Just because you have an environment variable set in one environment, does not mean it has been set in *all* environments.

    SCFG:

    ......................................................................... ...[.]................................................................... ... Main configuration file (/home/kk4qbn/sbbs/exec/main.cnf) missing! .. ......................................................................... ... .OK .. ......................................................................... .........................................................................

    You didn't specify *how* you ran scfg. If you ran it from an shell (e.g. bash), then immediate after getting that error type 'echo $SBBSCTRL' - it'll be either not set or set incorrectly.

    I have my SBBSCTRL env var set to /sbbs/ctrl, notice it is trying to load from the bbs users home directory.

    In that case (where SCFG) you didn't.

    even though I am running scfg, and all
    other programs from the symlinked dir /sbbs/exec.

    That makes no difference.

    Maybe I should pull all the export commands out of my config files in the bbs users home dir?

    I'm not sure what config files you're referring to.

    attempt to run jsexec from /sbbs/exec:

    kk4qbn@kk4qbn:/sbbs/exec$ ./jsexec

    SBBSCTRL environment variable not set and -c option not specified.

    Example: SET SBBSCTRL=/sbbs/ctrl

    or: ./jsexec -c /sbbs/ctrl [module]

    Returning error code: 1
    kk4qbn@kk4qbn:/sbbs/exec$

    So immediately after getting that error, from the same shell/environment, type 'echo $SBBSCTRL' and report back what you see.

    I can create scripts to run lets say scfg and jsexec like shown below, and they load correctly.

    #!/bin/sh
    cd /sbbs/exec
    SBBSCTRL=/sbbs/ctrl && export SBBSCTRL
    LD_LIBRARY_PATH=/sbbs/exec && export LD_LIBRARY_PATH
    ./scfg
    exit


    BUT, when I create a script the exact same way to run SBBS, as sbbs is loading it will give the error !SBBSCTRL environment not found using /sbbs/ctrl (typing from memory).

    Why does it do this?

    Because the environment variable was not set.

    if the script runs scfg correctly with no errors, why
    not sbbs?

    Because you did something wrong.

    digital man

    This Is Spinal Tap quote #40:
    Morty the Mime: Come on, don't talk back, mime is money, come on, move it. Norco, CA WX: 65.3oF, 25.0% humidity, 7 mph NE wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.04-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From KK4QBN@1:103/705 to Digital Man on Wed Apr 18 09:02:14 2018
    Re: My Screwey Ass Linux Box
    By: Digital Man to KK4QBN on Tue Apr 17 2018 18:50:25

    I don't understand this shit..
    I think the main point you fail to grasp there are *multiple* environments at any time on the system. Just because you have an environment variable set in one environment, does not mean it has been set in *all* environments.

    I'm beginning to realize that, I would hope that using /etc/profile would be universal.

    You didn't specify *how* you ran scfg. If you ran it from an shell (e.g. bash), then immediate after getting that error type 'echo $SBBSCTRL' - it'll be either not set or set incorrectly.

    I'm running it from bash as usual, I exported SBBSCTRL ~/.bashrc

    Maybe I should pull all the export commands out of my config files in
    the > bbs users home dir?
    I'm not sure what config files you're referring to.

    I was speaking of ~/.profile and ~/.bashrc

    attempt to run jsexec from /sbbs/exec:
    ning error code: 1
    kk4qbn@kk4qbn:/sbbs/exec$
    So immediately after getting that error, from the same shell/environment, type 'echo $SBBSCTRL' and report back what you see.

    I'm getting a blank line.

    I can create scripts to run lets say scfg and jsexec like shown
    below, and > they load correctly.

    #!/bin/sh
    cd /sbbs/exec
    SBBSCTRL=/sbbs/ctrl && export SBBSCTRL
    LD_LIBRARY_PATH=/sbbs/exec && export LD_LIBRARY_PATH
    ./scfg
    exit


    BUT, when I create a script the exact same way to run SBBS, as sbbs
    is > loading it will give the error !SBBSCTRL environment not found
    using /sbbs/ctrl (typing from memory).

    Why does it do this?
    Because the environment variable was not set.

    Why did the script not set it for sbbs when it did for scfg? I'm just trying to figure out what the crap i've done here.. I have'nt touched any main config settings in linux since it started woring.

    if the script runs scfg correctly with no errors, why
    not sbbs?

    Because you did something wrong.
    But what, It is the EXACT same setup in the script.. I'm not saying it is an SBBS issue, obviously it is an issue on my part.. but I'm just completely lost as to what to do.. thats why this message went to all, I was hopeing someone would see what I've screwed up.

    I don't know much about bash scripting, I've tried putting the export stament in many different places in the script, but mainly just at the end, I have also stuck it in between a if/fi (whaterver that is called) :) to make sure it gets exported. Something worked for a while then it suddenly stopped.

    I would like to find a universal way to get the environment variables in the environment, but I guess, from what your saying, that is impossible.

    So my "Guess" is that if it is setup *CORRECTLY* in /etc/profile and ~/.bashrc that should cover it? I'm just lost folks and desperatly needing help, because it's not too bad right now, because most of the scripts I've made have been keeping a lot of JS errors, etc at bay, but it bugs me that it is not runnig correctly and its more than likely a simple fix. can someone who runs bash and an debian derived system (mint) post a good snippet of the code and which files they are using to set these environment variables..

    I know it's not perfect because I might be running different environments than others, for myself I run SBBS with it's output straight to a console, using bash, under X so I can also run GTK monitor, and have other items at my hands quickly..

    Now I've have stupid issues with other things, but I have NEVER had an issues setting the reqiired environment variables, and I don't understand as in sbbs for example if I set and export that variable in the same script right before firing of SBBS, why is it still stating that it is not set? when all other programs I use this method with do..

    I'm just lost here.. I don't have the mental aptitude that I used to with linux, one is time constraints, 2 is I'm getting older and I've lived a dangerous, fast life, and I've lost the ability to do some of the stuff I did no more than 10 years ago.. just looking for understanding.. I don't understand how something can be working fine, then just stop working without touching the files that correspond to that. unless an update to the OS did somehow.

    same thing with my dosemu. my dosemu path has always been /usr/bin/dosemu.bin that is what I had setup in sbbsctrl.ini. one day all my dos programs just stopped working. finally I changed the path in sbbs.ini to just 'dosemu' and viola, it works again.. WTF? really :)

    either way, thanks for any help I get, or any suggestions regarless of if it helps or not.. just as in science a result is a result, and you learn from it anyway.

    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    ---
    * Synchronet * KK4QBN BBS - kk4qbn.com - 706.422.9538 - EM74OR - NW GA USA
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Digital Man@1:103/705 to KK4QBN on Wed Apr 18 14:59:40 2018
    Re: My Screwey Ass Linux Box
    By: KK4QBN to Digital Man on Wed Apr 18 2018 09:02 am

    Re: My Screwey Ass Linux Box
    By: Digital Man to KK4QBN on Tue Apr 17 2018 18:50:25

    I don't understand this shit..
    I think the main point you fail to grasp there are *multiple* environments at any time on the system. Just because you have an environment variable set in one environment, does not mean it has been set in *all* environments.

    I'm beginning to realize that, I would hope that using /etc/profile would be universal.

    That's a bash configuration file. It only applies when/while you are using bash. Run 'man bash' to learn how and when that file is used.

    You didn't specify *how* you ran scfg. If you ran it from an shell (e.g. bash), then immediate after getting that error type 'echo $SBBSCTRL' - it'll be either not set or set incorrectly.

    I'm running it from bash as usual, I exported SBBSCTRL ~/.bashrc

    Maybe I should pull all the export commands out of my config files in
    the > bbs users home dir?
    I'm not sure what config files you're referring to.

    I was speaking of ~/.profile and ~/.bashrc

    attempt to run jsexec from /sbbs/exec:
    ning error code: 1
    kk4qbn@kk4qbn:/sbbs/exec$
    So immediately after getting that error, from the same shell/environment, type 'echo $SBBSCTRL' and report back what you see.

    I'm getting a blank line.

    That means the environment variable is not set in the context (environment) in which you are running that command. If you can't "echo $SBBSCTRL" successfully, then don't expect any of the Synchronet programs which need that environment variable to work.

    I can create scripts to run lets say scfg and jsexec like shown
    below, and > they load correctly.

    #!/bin/sh
    cd /sbbs/exec
    SBBSCTRL=/sbbs/ctrl && export SBBSCTRL
    LD_LIBRARY_PATH=/sbbs/exec && export LD_LIBRARY_PATH
    ./scfg
    exit


    BUT, when I create a script the exact same way to run SBBS, as sbbs
    is > loading it will give the error !SBBSCTRL environment not found
    using /sbbs/ctrl (typing from memory).

    Why does it do this?
    Because the environment variable was not set.

    Why did the script not set it for sbbs when it did for scfg?

    I don't know, but most likely you just have a typo or some other mistake.

    I'm just trying
    to figure out what the crap i've done here.. I have'nt touched any main config settings in linux since it started woring.

    if the script runs scfg correctly with no errors, why
    not sbbs?

    Because you did something wrong.
    But what, It is the EXACT same setup in the script.. I'm not saying it is an SBBS issue, obviously it is an issue on my part.. but I'm just completely lost as to what to do.. thats why this message went to all, I was hopeing someone would see what I've screwed up.

    You would need to supply all the related files.

    But more importantly, if the SBBSCTRL environment variable is being set correctly/successfully in your shell (bash) environment, you shouldn't need any shell script to set it *again* and then run a/the Synchronet executables.

    I don't know much about bash scripting, I've tried putting the export stament in many different places in the script, but mainly just at the end, I have also stuck it in between a if/fi (whaterver that is called) :) to make sure it gets exported. Something worked for a while then it suddenly stopped.

    I would like to find a universal way to get the environment variables in the environment, but I guess, from what your saying, that is impossible.

    There is "the environment". The /etc/profile is supposed to be executed for most instances of bash (again, see 'man bash' for details), but that would need to be modified correctly to add environment variables. Without seeing your full /etc/profile file contents, I can't guess whether you did that correctly or not.

    So my "Guess" is that if it is setup *CORRECTLY* in /etc/profile and ~/.bashrc that should cover it?

    The documentation for your version of bash should tell you (again, 'man bash').

    I'm just lost folks and desperatly needing
    help, because it's not too bad right now, because most of the scripts I've made have been keeping a lot of JS errors, etc at bay, but it bugs me that it is not runnig correctly and its more than likely a simple fix. can someone who runs bash and an debian derived system (mint) post a good snippet of the code and which files they are using to set these environment variables..

    I set it in my /root/.profile, like so:

    ----- 8< snip -----

    root@cvs:~# cat .profile
    # ~/.profile: executed by Bourne-compatible login shells.

    if [ "$BASH" ]; then
    if [ -f ~/.bashrc ]; then
    . ~/.bashrc
    fi
    fi

    mesg n

    export SBBSCTRL="/sbbs/ctrl"
    export LANG="C"

    ----- 8< snip -----

    And then if I login as 'root' and run 'echo $SBBSCTRL', I see the variable set in the environment of the shell I'm using:

    root@cvs:~# echo $SBBSCTRL
    /sbbs/ctrl

    I've done the same for other user accounts on the system which I use to execute Synchronet programs.

    I know it's not perfect because I might be running different environments than others, for myself I run SBBS with it's output straight to a console, using bash, under X so I can also run GTK monitor, and have other items at my hands quickly..

    If it's under X, aren't running a GUI terminal, like xterm?

    Now I've have stupid issues with other things, but I have NEVER had an issues setting the reqiired environment variables, and I don't understand as in sbbs for example if I set and export that variable in the same script right before firing of SBBS, why is it still stating that it is not set?

    Show us the script in question.

    digital man

    Synchronet/BBS Terminology Definition #45:
    SEXPOTS = Synchronet External Plain Old Telephone System (POTS) service
    Norco, CA WX: 71.3oF, 31.0% humidity, 12 mph E wind, 0.00 inches rain/24hrs
    --- SBBSecho 3.04-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Tony Langdon@3:633/410 to KK4QBN on Thu Apr 19 07:53:00 2018
    KK4QBN wrote to Digital Man <=-

    Why did the script not set it for sbbs when it did for scfg? I'm just trying to figure out what the crap i've done here.. I have'nt touched
    any main config settings in linux since it started woring.


    I think you might be having issues with different user contexts. I'm guessing you're starting SBBS with sudo, which means SBBS is starting as root and getting its environment from that user. Have you tried setting SBBSCTRL in root's environment?

    While I've had no issues starting SBBS that way, I went to starting it as a user (using the instructions on the wiki to allow it to bind the low ports), for other reasons of ease of management.


    ... ERROR LPT1 not found.. SUBST PRN: Z:\PENCIL\PAPER
    === MultiMail/Win32 v0.49
    --- SBBSecho 3.03-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)
  • From Digital Man@1:103/705 to Tony Langdon on Wed Apr 18 18:31:04 2018
    Re: Re: My Screwey Ass Linux Box
    By: Tony Langdon to KK4QBN on Thu Apr 19 2018 07:53 am

    KK4QBN wrote to Digital Man <=-

    Why did the script not set it for sbbs when it did for scfg? I'm just trying to figure out what the crap i've done here.. I have'nt touched any main config settings in linux since it started woring.


    I think you might be having issues with different user contexts. I'm guessing you're starting SBBS with sudo, which means SBBS is starting as root and getting its environment from that user. Have you tried setting SBBSCTRL in root's environment?

    While I've had no issues starting SBBS that way, I went to starting it as a user (using the instructions on the wiki to allow it to bind the low ports), for other reasons of ease of management.

    Also, if you use 'sudo' to execute a program, you don't get a copy of the caller's environment unless you use 'sudo -e'. I'm pretty sure that's been pointed on here before as well.

    digital man

    This Is Spinal Tap quote #3:
    How much more black could this be? and the answer is none. None more black. Norco, CA WX: 66.8oF, 36.0% humidity, 2 mph ENE wind, 0.00 inches rain/24hrs --- SBBSecho 3.04-Linux
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Tony Langdon@3:633/410 to Digital Man on Thu Apr 19 11:58:00 2018
    Digital Man wrote to Tony Langdon <=-

    Also, if you use 'sudo' to execute a program, you don't get a copy of
    the caller's environment unless you use 'sudo -e'. I'm pretty sure
    that's been pointed on here before as well.

    Yes, one has to keep all the different contexts straight in their head when using sudo and friends. :) sudo -e sounds like the go.


    ... The only thing wrong with immortality is that it tends to go on forever. === MultiMail/Win32 v0.49
    --- SBBSecho 3.03-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)
  • From KK4QBN@1:103/705 to Digital Man on Thu Apr 19 04:41:53 2018
    Re: Re: My Screwey Ass Linux Box
    By: Digital Man to Tony Langdon on Wed Apr 18 2018 18:31:04

    KK4QBN wrote to Digital Man <=-

    Why did the script not set it for sbbs when it did for scfg? I'm
    just trying to figure out what the crap i've done here.. I have'nt
    touched any main config settings in linux since it started woring.


    I think you might be having issues with different user contexts. I'm
    guessing you're starting SBBS with sudo, which means SBBS is starting
    as root and getting its environment from that user. Have you tried
    setting SBBSCTRL in root's environment?

    Tony, I think you have it.. sorry I did'nt reply to you personally but I do believe you will recieve this. that has to be what is happening. I AM starting sbbs with sudo then changing back to the kk4qbn username, I KNEW something had to be wrong when I ran sbbs outside of X and still recieved the issues


    While I've had no issues starting SBBS that way, I went to starting it
    as a user (using the instructions on the wiki to allow it to bind the
    low ports), for other reasons of ease of management.

    Also, if you use 'sudo' to execute a program, you don't get a copy of the caller's environment unless you use 'sudo -e'. I'm pretty sure that's been pointed on here before as well.

    No, I'm sorry, this has not been covered unless I missed an email somewhere, and in an earlier email I was going to reply to you to (an errant cut and paste job threw out some sequences that threw me halfway across my BBS) You asked for me to post the script that I used to run sbbs, I had posted that script a couple times (One in the message you replied to) either way, that does'nt matter.

    DM, i've been doing this for a while, but my memory is starting to get bad at times, so sometimes I'm not so lucid.

    I threw out an all points bulletin because I have just never had something just work for me and then stop working for me under linux (I have windows) I've never seen rc and .profiles dynamically change, and afaik they have'nt. I was just lost as to what was going on. SBBS is as complex as it as ever been and what I'm running now is pretty much a frankenstiens monster version of linux, so yeah.. I need to learn more stuff.. and YES I WILL MAN BASH :-)

    I'm sure everything will be running proper soon. I had 0 errors over night even with the ctrl environment not set (it must be there for some things).

    and as for the dosemu issue, I've yet to figure out why I had to change from /usr/bin/dosemu.bin to dosemu.

    you stated in previous emails that I may have made typos in the config files, no, even though I have typos in my messages, config files I go over 5 or 6 times if something is wrong.

    I believe Tony has nailed the issues down with this one, so I will give it a try.

    Thanks guys.. the BBS has'nt really been giving any issues (other than this which most of the time I can mygyver my way out of) but the fact it was'nt running correctly bugged me. I might end up just giving the whole bbs tree to root, but thought it would be on the safer side to run it in a user environment. Rob, I promise I'll try more manpages and documentation, it seems bad habits die hard. I've always been a skimmer, and every since my first BBS and my first linux distro I have gotten by (mostly) by skimming if I read the full documentation I may actually learn JS, etc.. or at least how to get this fiasco worked out..

    anyway, Rob, Tony thanks again..



    --

    Tim Smith (KK4QBN)
    KK4QBN BBS

    ---
    * Synchronet * KK4QBN BBS - kk4qbn.com - 706.422.9538 - EM74OR - NW GA USA
    * Origin: Vertrauen - [vert/cvs/bbs].synchro.net (1:103/705)
  • From Tony Langdon@3:633/410 to KK4QBN on Fri Apr 20 07:20:00 2018
    KK4QBN wrote to Digital Man <=-

    I believe Tony has nailed the issues down with this one, so I will give
    it a try.

    Thanks guys.. the BBS has'nt really been giving any issues (other than this which most of the time I can mygyver my way out of) but the fact
    it was'nt running correctly bugged me. I might end up just giving the whole bbs tree to root, but thought it would be on the safer side to
    run it in a user environment. Rob, I promise I'll try more manpages
    and documentation, it seems bad habits die hard. I've always been a skimmer, and every since my first BBS and my first linux distro I have gotten by (mostly) by skimming if I read the full documentation I may actually learn JS, etc.. or at least how to get this fiasco worked
    out..

    anyway, Rob, Tony thanks again..

    Good luck, hope it works out. Let us know how you go. :)

    I skim the docs initially, then look for detail when things don't go as planned, sometimes even googling for more answers. :)


    ... Poker: It's darkest just before you've drawn.
    === MultiMail/Win32 v0.49
    --- SBBSecho 3.03-Linux
    * Origin: Freeway BBS Bendigo,Australia freeway.apana.org.au (3:633/410)