788 reputation
822
bio website beatgammit.com
location Provo, UT
age 26
visits member for 3 years, 1 month
seen Jul 22 at 22:14

I am studying Computer Science at Brigham Young University. I been interested in computers and computer programming since I was a teenager.


Aug
7
comment Bash- detect init system
Hmph, so it's looking like I can't have a 'one script to rule them all' solution. I've seen a lot of programs that use autoconf or similar to handle cross-platform stuff, but it doesn't seem like it's the right tool for my application. Is maintaining versions for each platform really the only reliable solution?
Aug
7
comment Bash- detect init system
Cool, thanks for all your help. You definitely have pointed me in the right direction.
Aug
7
comment Bash- detect init system
So, are you saying that there is no reliable way to detect the init system programmatically? Having the user pass in parameters is certainly safer, but if the user does not pass anything in, what would be the best way to guess?
Aug
7
comment Bash- detect init system
What do you mean by "look at the init scripts type"? Often different init systems put their scripts/files somewhere besides /etc/init, like systemd puts them in /etc/systemd. If I was to have my script grok these, it could take a little while. Oh, and thanks for the link BTW for portable shell programming.
Aug
6
asked Bash- detect init system
Jul
10
comment Kernel inotify watch limit reached
@ultrasawblade- inotify replaced dnotify. dnotify was slow and buggy. inotify can be used on directories, and a directory will be "changed" when one of the files in that directory (one level deep) is modified. Directories are just files anyway.
Jul
9
accepted Automated PAM module installation
Jul
9
comment Automated PAM module installation
Ok, that makes sense. I guess I will create some sample config files and give detailed instructions on the preferred setup.
Jul
9
accepted What environment do I get with sudo?
Jul
9
comment What environment do I get with sudo?
I didn't know about the secure_path option. The default did not include /usr/local/bin on my install. Thanks, this really helped clear stuff up!
Jul
9
asked Automated PAM module installation
Jul
6
comment Bash: double equals vs -eq
@Gilles- Oops, good catch.
Jul
6
revised Bash: double equals vs -eq
added 2 characters in body
Jul
5
accepted Bash: double equals vs -eq
Jul
5
comment Bash: double equals vs -eq
Does that mean that if both sides are integers, it converts both sides to strings and then compares them?
Jul
5
asked Bash: double equals vs -eq
Jul
5
comment What environment do I get with sudo?
@Gilles- Good point. I added my OS. I have only really noticed this on Fedora (I used to use Ubuntu), but I thought that was because they didn't add a lot of convenience setup.
Jul
5
revised What environment do I get with sudo?
Added OS
Jul
5
comment What environment do I get with sudo?
Still didn't fix it. I tried adding a line to the end of '/etc/bashrc` and /etc/profile, neither of which changed the PATH output from sudo env.
Jul
5
comment What environment do I get with sudo?
Does sudo source /root/.bashrc? That's where I add /usr/local/bin to root`s path (I had to do this manually, unfortunately)?