Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Post
  • Reply
FlapYoJacks
Feb 12, 2009

kruna posted:

I apologize if this isn't the right place for my question.

I'm studying computational physics and I just got into some coding w/r/t comp. physics. I could use some advice about which Linux distro to use. I'll be mostly working with Java and C++, also whatever else comes up really. I briefly used Ubuntu years ago but that was just trying it for...fun. I'll also be dual booting on a laptop. Just some advice and a link or two to some info would be awesome.

Ubuntu. Install gnome-shell after you are done installing everything.

Adbot
ADBOT LOVES YOU

Varkk
Apr 17, 2004

kruna posted:

I apologize if this isn't the right place for my question.

I'm studying computational physics and I just got into some coding w/r/t comp. physics. I could use some advice about which Linux distro to use. I'll be mostly working with Java and C++, also whatever else comes up really. I briefly used Ubuntu years ago but that was just trying it for...fun. I'll also be dual booting on a laptop. Just some advice and a link or two to some info would be awesome.

What does the department you are studying in use? Also are there any other packages you would be using? (Matlab, IDL, etc). I would lean towards either a RHEL clone (CentOS or Scientific Linux) or Fedora Scientific spin if you want more up to date versions of software. When I was studying I often found the software we tended to use often assumed it was going to be run on a Redhat based distro.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

fletcher posted:

Chef question incoming...

The git cookbook has 6,334 downloads. In the metadata.json, it lists yum-epel as a dependency. Chef crashed because I didn't have yum-epel yet. yum-epel has only been downloaded 162 times though. How are all these people using the git cookbook without downloading yum-epel? I feel like I might be doing something wrong with cookbooks & dependencies. I'm using chef-solo, if that makes a difference.
That dependency was added into version 2.9.0 on 12/17. That version has 96 total downloads.

If you're using Chef Solo and don't have anything for automatic dependency management, I strongly recommend looking at Berkshelf, especially if you have a Vagrant-driven development workflow.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Misogynist posted:

That dependency was added into version 2.9.0 on 12/17. That version has 96 total downloads.

If you're using Chef Solo and don't have anything for automatic dependency management, I strongly recommend looking at Berkshelf, especially if you have a Vagrant-driven development workflow.

Ahh that makes sense. Thanks!

I actually ran into this while I was working on my first Vagrantfile. Wish I had used Vagrant when I was originally developing my cookbooks, soooo much easier to iterate on things.

I've been meaning to take a closer look at Berkshelf, definitely going to do that right now. Thank you!!

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

ratbert90 posted:

Ubuntu. Install gnome-shell after you are done installing everything.

Ubuntu and GNOME3 don't work well together. Use Unity if you want to use Ubuntu.

kruna
Jun 6, 2006
I missed the rapture.

Varkk posted:

What does the department you are studying in use? Also are there any other packages you would be using? (Matlab, IDL, etc).

In the future I will be using those. Right now I just need to be able to spit out some data and maybe graph it. I've been told you can do that with a single command line in linux. So I need to learn me some of that. Thanks for the recommendations, I will look into those.

FlapYoJacks
Feb 12, 2009

Suspicious Dish posted:

Ubuntu and GNOME3 don't work well together. Use Unity if you want to use Ubuntu.

I use gnome-shell day in and day out at my job without any issues, I have no clue what you are talking about.

Qtotonibudinibudet
Nov 7, 2011



Omich poluyobok, skazhi ty narkoman? ya prosto tozhe gde to tam zhivu, mogli by vmeste uyobyvat' narkotiki

kruna posted:

I apologize if this isn't the right place for my question.

I'm studying computational physics and I just got into some coding w/r/t comp. physics. I could use some advice about which Linux distro to use. I'll be mostly working with Java and C++, also whatever else comes up really. I briefly used Ubuntu years ago but that was just trying it for...fun. I'll also be dual booting on a laptop. Just some advice and a link or two to some info would be awesome.

For you, distro choice probably mostly boils down to choice of interface/setup/other non-programming things. Any distro will be approximately the same as far as being able to compile Java and C++ goes, and if you need some special library it'll probably be hell to get it onto any distro whose quirks you aren't familiar with, but maybe easier on anything with a large following since someone else has probably tried to do it.

So basically what everyone else has already said--Ubuntu is fine because it's popular and geared towards people who don't care about configuring their OS innards more than necessary. CentOS/Redhat would probably also be fine and worth considering if your school labs run them to minimalize any compatibility issues.

On to question time: I have the following network setup: home 192.168.0.0/16 -> pfsense/FreeBSD gateway <-> OpenSwan/Linux server (aka spud). I want to route all internet traffic from home over the tunnel out spud, and want be able to talk to home directly from spud.

OpenSwan ipsec.conf on spud currently looks like:

quote:

<ipsec/ike stuff>
left=%defaultroute
leftsubnet=67.203.139.148/32
right=<home internet address>
rightsubnet=192.168.0.0/16

67.203.139.148/32 is a temporary test "internet" so I don't break my entire home internet.

Currently if I try to talk from home to internet, I see packets leave spud with the private home network address as the source address. If I try to talk to home from spud, I see packets leave spud's internet interface destined for the private address. Both of these (obviously) fail.

How do I tell spud to NAT internet-bound traffic originating from the tunnel to its own address, and how do I get it to send private-bound traffic through the tunnel? https://doc.pfsense.org/index.php/Routing_internet_traffic_through_a_site-to-site_IPsec_tunnel suggests that, for the former at least, I'd add a NAT rule on spud, but "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" did gently caress all.

Experto Crede
Aug 19, 2008

Keep on Truckin'
Can anyone recommend a way to control a libreoffice impress presentation running on an install of mint through my phone, like remote buddy for mac? The phone's android.

evol262
Nov 30, 2010
#!/usr/bin/perl

calandryll posted:

Question, I have a Dell Vostro laptop. I've run into 2 issues with Ubuntu, technically eOS but close enough. The dim buttons are recognized but do not actually dim the screen. The second is when I close the lid, which is set to suspend, it does not suspend correctly. If I chose to suspend it works great. Any suggestios?

This is probably a problem with dell-laptop (the kernel module which controls actually dimming the backlight). Look for bug reports. Try acpi_backlight=vendor as a kernel option. It's really hard to say without knowing exactly which laptop you have.

Define "not suspend correctly", please. Triggering events on lid close/open is also ACPI related.

fivre posted:

On to question time: I have the following network setup: home 192.168.0.0/16 -> pfsense/FreeBSD gateway <-> OpenSwan/Linux server (aka spud). I want to route all internet traffic from home over the tunnel out spud, and want be able to talk to home directly from spud.

OpenSwan ipsec.conf on spud currently looks like:

67.203.139.148/32 is a temporary test "internet" so I don't break my entire home internet.

Currently if I try to talk from home to internet, I see packets leave spud with the private home network address as the source address. If I try to talk to home from spud, I see packets leave spud's internet interface destined for the private address. Both of these (obviously) fail.

How do I tell spud to NAT internet-bound traffic originating from the tunnel to its own address, and how do I get it to send private-bound traffic through the tunnel? https://doc.pfsense.org/index.php/Routing_internet_traffic_through_a_site-to-site_IPsec_tunnel suggests that, for the former at least, I'd add a NAT rule on spud, but "iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE" did gently caress all.
I can't actually figure out what you're trying to do here. Are you trying to ipsec between pfsense and openswan? openswan and some server out there on the internet? What do you mean by "talk to home from spud"? From an offsite ipsec tunnel? To arbitrate access to all your computers when you're actually on the home wifi? What?

Does the ipsec tunnel come up? Is ipv4 forwarding on? Is eth0 actually your ipsec tunnel (probably not)? Do you need to SNAT? Is this actually site-to-site, or are you just trying to run all traffic through some external host?

Post your actual configs, a diagram (text in a code block is fine), and what you're trying to accomplish, please.

YouTuber
Jul 31, 2004

by FactsAreUseless

kruna posted:

I apologize if this isn't the right place for my question.

I'm studying computational physics and I just got into some coding w/r/t comp. physics. I could use some advice about which Linux distro to use. I'll be mostly working with Java and C++, also whatever else comes up really. I briefly used Ubuntu years ago but that was just trying it for...fun. I'll also be dual booting on a laptop. Just some advice and a link or two to some info would be awesome.

Just install Linux Mint, it's the closest looking thing to Windows and will let you focus on your work easier. It's a tad bit more feature friendly than Ubuntu and uses the same Repositories so Mint has everything that Ubuntu has in terms of applications. I think it's the most popular Distro at this point. But to be fair Kubuntu, Edubuntu, Lubuntu, Ubuntu, Linux Mint can all serve your needs just fine. They're functionally identical underneath the surface but with a different desktop environment to present the poo poo to you.

Also I believe Suspicious Dish is referring to Gnome 3 installing Gnome Online Accounts and Ubuntu using Ubuntu Online Accounts. The two clash and the computer doesnt know wtf when using the Single Sign on stuff for Facebook and Google accounts.

YouTuber fucked around with this message at 00:33 on Jan 24, 2014

Suspicious Dish
Sep 24, 2011

2020 is the year of linux on the desktop, bro
Fun Shoe

ratbert90 posted:

I use gnome-shell day in and day out at my job without any issues, I have no clue what you are talking about.

YouTuber posted:

Also I believe Suspicious Dish is referring to Gnome 3 installing Gnome Online Accounts and Ubuntu using Ubuntu Online Accounts. The two clash and the computer doesnt know wtf when using the Single Sign on stuff for Facebook and Google accounts.

They bundle old versions of gnome-settings-daemon and gnome-control-center, and patch the hell out of them. These are low-level system components that GNOME depends on heavily, and when APIs change like this, it can lead to instability.

Sometimes these downstream issues even show up in our bug tracker.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Experto Crede posted:

Can anyone recommend a way to control a libreoffice impress presentation running on an install of mint through my phone, like remote buddy for mac? The phone's android.
I'm not aware of anything like that working on Linux, so your best bet is probably a mobile VNC client. If you needed to, you could probably hack something really awful together with xdotool over SSH.

reading
Jul 27, 2013
Does anyone know how I can get Tor working from the command line? The only command line args for it are for windows, apparently, even according to the linux man page (????). I want to set up a bridge from the command line, not the browser bundle's GUI. I'm using Xubuntu.

Qtotonibudinibudet
Nov 7, 2011



Omich poluyobok, skazhi ty narkoman? ya prosto tozhe gde to tam zhivu, mogli by vmeste uyobyvat' narkotiki

evol262 posted:

This is probably a problem with dell-laptop (the kernel module which controls actually dimming the backlight). Look for bug reports. Try acpi_backlight=vendor as a kernel option. It's really hard to say without knowing exactly which laptop you have.

Define "not suspend correctly", please. Triggering events on lid close/open is also ACPI related.

I can't actually figure out what you're trying to do here. Are you trying to ipsec between pfsense and openswan? openswan and some server out there on the internet? What do you mean by "talk to home from spud"? From an offsite ipsec tunnel? To arbitrate access to all your computers when you're actually on the home wifi? What?

Does the ipsec tunnel come up? Is ipv4 forwarding on? Is eth0 actually your ipsec tunnel (probably not)? Do you need to SNAT? Is this actually site-to-site, or are you just trying to run all traffic through some external host?

Post your actual configs, a diagram (text in a code block is fine), and what you're trying to accomplish, please.

Basically I want to run all traffic from my house through the external host (spud), and have spud be able to talk to the private addresses on my home network.

Figured most of it out--ip forwarding was disabled, which was breaking connections from home, and I hadn't set a rightnexthop so spud knew what to route packets through.

There's still some weird issue with the home router not wanting to accept connections from hosts off a certain interface if the tunnel's up, but that's some weird pfsense issue.

calandryll
Apr 25, 2003

Ask me where I do my best drinking!



Pillbug

evol262 posted:

This is probably a problem with dell-laptop (the kernel module which controls actually dimming the backlight). Look for bug reports. Try acpi_backlight=vendor as a kernel option. It's really hard to say without knowing exactly which laptop you have.

Define "not suspend correctly", please. Triggering events on lid close/open is also ACPI related.

Sorry wasn't in front of my laptop to give any more details. I'm using a Vostro 3500, just a standard setup. Here is my current info:
Linux Nyssa 3.8.0-35-generic #50~precise1-Ubuntu SMP Wed Dec 4 17:25:51 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

From grub:
GRUB_CMDLINE_LINUX="acpi_osi=Linux acpi_backlight=vendor"

I've rebooted, etc after making changes and nothing so far. It's not a big deal as my laptop stays plugged in the majority of the time. The few times I am unplugged, I'd like to dim the screen to save battery.

As for not suspending correctly, when I close the lid it looks to go through the steps of suspension but freezes at one point. I get the elementaryOS logo on my screen and it is froze, hard reset fixes it. I haven't messed with this stuff before so I'm not sure where to start looking.

evol262
Nov 30, 2010
#!/usr/bin/perl

calandryll posted:

Sorry wasn't in front of my laptop to give any more details. I'm using a Vostro 3500, just a standard setup. Here is my current info:
Linux Nyssa 3.8.0-35-generic #50~precise1-Ubuntu SMP Wed Dec 4 17:25:51 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux

From grub:
GRUB_CMDLINE_LINUX="acpi_osi=Linux acpi_backlight=vendor"

I've rebooted, etc after making changes and nothing so far. It's not a big deal as my laptop stays plugged in the majority of the time. The few times I am unplugged, I'd like to dim the screen to save battery.

As for not suspending correctly, when I close the lid it looks to go through the steps of suspension but freezes at one point. I get the elementaryOS logo on my screen and it is froze, hard reset fixes it. I haven't messed with this stuff before so I'm not sure where to start looking.

This is all kernel stuff, so you basically google for your problems and file bugs. Have you filed bugs? Because you should. It seems like it's all broadcom/nvidia proprietary crap, and that suspend might work properly if you're using nouveau instead of nv (since nv doesn't actually use in-kernel KMS, but "nomodeset" might help).

Winkle-Daddy
Mar 10, 2007

reading posted:

Does anyone know how I can get Tor working from the command line? The only command line args for it are for windows, apparently, even according to the linux man page (????). I want to set up a bridge from the command line, not the browser bundle's GUI. I'm using Xubuntu.

https://www.torproject.org/docs/debian#ubuntu

This should help. Tor should have init.d scripts, so you would just need to sudo /etc/init.d/tor start once installed.

edit: read the disclaimer, don't install from default repos.

Winkle-Daddy fucked around with this message at 16:47 on Jan 24, 2014

calandryll
Apr 25, 2003

Ask me where I do my best drinking!



Pillbug

evol262 posted:

This is all kernel stuff, so you basically google for your problems and file bugs. Have you filed bugs? Because you should. It seems like it's all broadcom/nvidia proprietary crap, and that suspend might work properly if you're using nouveau instead of nv (since nv doesn't actually use in-kernel KMS, but "nomodeset" might help).

Digging a bit with those links, I got it finally working. I removed acpi_backlight=vendor from my grub, added Option "RegistryDwords" "EnableBrightnessControl=1" to my xorg.conf. It works with both nouveau and nvidia drivers. The suspend on lid closing fixed itself with that as well. Thanks for the help.

syzygy86
Feb 1, 2008

Experto Crede posted:

Can anyone recommend a way to control a libreoffice impress presentation running on an install of mint through my phone, like remote buddy for mac? The phone's android.

The Libre Office devs make an Android app for controlling Impress:
https://play.google.com/store/apps/details?id=org.libreoffice.impressremote

There are some instructions for setting up Impress here:
https://wiki.documentfoundation.org/Development/Impress/RemoteHowTo

Hollismason
Jun 30, 2007
An alright dude.
I thought I'd ask here since other thread doesn't seem to know. I'm using Ubuntu 12.04 LTS, it's an iphone 4 7.0.4 is the version I think.


Here are the error msgs

DBus error org.freedesktop.DBus.Error.NoReply: Message did not receive a reply (timeout by message bus

Second Error

The device 'Not an iPhone' is locked. Enter the passcode on the device and click 'Try again'.

What's strange is that it shows up in Nautilus under devices. It just says the phone is locked when it's not.

Even though it says it's not mounted its there.

Any one have any luck with getting

Captain Pike
Jul 29, 2003

I have a laptop in my living room with CentOS 6. I would like to upload images from my webcam to my server every X seconds. Does anyone have a software recommendation?


(I'm not a creeper, my house has flooded, so the cleaning company is leaving my windows open all day and night. I don't want jerks to steal my riches.)

JHVH-1
Jun 28, 2002

Captain Pike posted:

I have a laptop in my living room with CentOS 6. I would like to upload images from my webcam to my server every X seconds. Does anyone have a software recommendation?


(I'm not a creeper, my house has flooded, so the cleaning company is leaving my windows open all day and night. I don't want jerks to steal my riches.)

If you just want to write up a script, stuff like mplayer or vlc should be able to access the video device on cli to generate an image and then you can upload that to replace the previous one (or create them time stamped)

But maybe something GUI does what you want (that I have no clue about)

Tad Naff
Jul 8, 2004

I told you you'd be sorry buying an emoticon, but no, you were hung over. Well look at you now. It's not catching on at all!
:backtowork:
I use the "motion" package on Ubuntu. It's sort of unmaintained and fiddly and there's probably a better solution, but it lets me spy on my dog during the day at least.

wwb
Aug 17, 2004

I am standing up some semi-managed web servers here and it seems we made a slight boo boo ordering -- we wanted another volume mounted at /srv but someone told them to mount it in /var. A reasonable approach would be to get them to rebuild the VMs with the actual desired mountings, but before we lose a week making that happen I would love to know if doing something like symbolicly linking /var/websites to /srv/websites would have any negative side effects?

Websites in question are a variety of drupal and wordpress apps with a few staticish php sites folded in. Traffic not crazy except when we get ddosed.

PS: Servers are redhat 6.5 on vmware esxi if that matters.

wwb fucked around with this message at 14:25 on Jan 27, 2014

evol262
Nov 30, 2010
#!/usr/bin/perl

wwb posted:

I am standing up some semi-managed web servers here and it seems we made a slight boo boo ordering -- we wanted another volume mounted at /srv but someone told them to mount it in /var. A reasonable approach would be to get them to rebuild the VMs with the actual desired mountings, but before we lose a week making that happen I would love to know if doing something like symbolicly linking /var/websites to /srv/websites would have any negative side effects?

Websites in question are a variety of drupal and wordpress apps with a few staticish php sites folded in. Traffic not crazy except when we get ddosed.

PS: Servers are redhat 6.5 on vmware esxi if that matters.

As long as apache is configured to follow symlinks, permissions are right, and selinux is off (or hopefully, everything is in the right context, probably httpd_sys_context_t), your biggest worry is something filling up /var/log and wedging apache.

Bob Morales
Aug 18, 2006


Just wear the fucking mask, Bob

I don't care how many people I probably infected with COVID-19 while refusing to wear a mask, my comfort is far more important than the health and safety of everyone around me!

Can dovecot handle giant sized mailboxes like 20-100GB without puking?

wwb
Aug 17, 2004

evol262 posted:

As long as apache is configured to follow symlinks, permissions are right, and selinux is off (or hopefully, everything is in the right context, probably httpd_sys_context_t), your biggest worry is something filling up /var/log and wedging apache.

Yup, that should be covered.

/var has 120gb so I hope I don't get that much traffic. We gave up on selinux as it really got annoying with automated deployments, loads of stuff running on odd ports intentionally, etc. Maybe next go round.

PS: define "permissions are right" for me if you could . . .

RFC2324
Jun 7, 2012

http 418

So, I am working on a script, and having some issues with an eval function. This is in a solaris 8/9/10 environment, so things are a little different than I am used to seeing.

code:
for i in $*; do
	if [[ "ssh -t \"$i\" find /opt/bmc/scripts/ -name check-var-crash-files.sh | wc -l" = "0" ]]
		then 
			ssh -t $i sudo scp x0210454@utility:/opt/bmc/scripts/check-var-crash-files.sh /opt/bmc/scripts
			echo "--------------- Missing script on $i placed. ----------------"
			exit
	fi
done
This is appearing to fail every time, and I cannot figure out why. Anyone have any suggestions?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
For my servers on ec2 I have to run mkfs to make the EBS mounts usable, and it's the only step of provisioning that I have not automated. I am scared of adding mkfs commands to my chef recipes though. Obviously I can do testing to make sure everything works as expected and I'm not gonna accidentally blow away any data (which is backed up anyways) but...Is there a particular way I should run mkfs to make it less dangerous?

FlapYoJacks
Feb 12, 2009

RFC2324 posted:

So, I am working on a script, and having some issues with an eval function. This is in a solaris 8/9/10 environment, so things are a little different than I am used to seeing.

code:
for i in $*; do
	if [[ "ssh -t \"$i\" find /opt/bmc/scripts/ -name check-var-crash-files.sh | wc -l" = "0" ]]
		then 
			ssh -t $i sudo scp x0210454@utility:/opt/bmc/scripts/check-var-crash-files.sh /opt/bmc/scripts
			echo "--------------- Missing script on $i placed. ----------------"
			exit
	fi
done
This is appearing to fail every time, and I cannot figure out why. Anyone have any suggestions?

What is $* ?

RFC2324
Jun 7, 2012

http 418

ratbert90 posted:

What is $* ?

All arguments being passed to the script. The idea is for it to take a list of servers, and correct all of the issues that are causing that particular alarm to go off(this section checks for the script that triggers the alarm, and places it if it is missing).

Everything else in the script works, just not this one segment, and it looks like the eval is failing.

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

Bob Morales posted:

Can dovecot handle giant sized mailboxes like 20-100GB without puking?
Mailbox size is pretty irrelevant in most modern mail servers; the total number of messages per folder is a much bigger performance factor. Dovecot supports Maildir, which uses one message per file, and dbox, which is a high-performance store that uses some kind of consistent hashing to store multiple emails per file. Avoid mbox and you'll be fine with big attachments.

telcoM
Mar 21, 2009
Fallen Rib

RFC2324 posted:

code:
	if [[ "ssh -t \"$i\" find /opt/bmc/scripts/ -name check-var-crash-files.sh | wc -l" = "0" ]]
This is appearing to fail every time, and I cannot figure out why. Anyone have any suggestions?

I see no eval there, just a string comparision that is obviously always going to be false.

You'll want something like this instead:
code:
        if [[ $(ssh -t "$i" find /opt/bmc/scripts/ -name check-var-crash-files.sh | wc -l) = "0" ]]
Edit: Or if the Solaris shell does not accept the "$( ... )" syntax, then the backticks:
code:
        if [[ `ssh -t "$i" find /opt/bmc/scripts/ -name check-var-crash-files.sh | wc -l` = "0" ]]
The "if [[ ... ]]" construct is essentially similar to "if [ ... ]", but it uses shell's internal conditional expression evaluator instead of the POSIX standard /usr/bin/[, also known as /usr/bin/test. There may be some differences between the POSIX standard conditional expression evaluator and the shell's built-in one, but the built-in one is definitely not going to evaluate a double-quoted string as a command just like that.

telcoM fucked around with this message at 08:08 on Jan 29, 2014

RFC2324
Jun 7, 2012

http 418

telcoM posted:

I see no eval there, just a string comparision that is obviously always going to be false.

You'll want something like this instead:
code:
        if [[ $(ssh -t "$i" find /opt/bmc/scripts/ -name check-var-crash-files.sh | wc -l) = "0" ]]
Edit: Or if the Solaris shell does not accept the "$( ... )" syntax, then the backticks:
code:
        if [[ `ssh -t "$i" find /opt/bmc/scripts/ -name check-var-crash-files.sh | wc -l` = "0" ]]
The "if [[ ... ]]" construct is essentially similar to "if [ ... ]", but it uses shell's internal conditional expression evaluator instead of the POSIX standard /usr/bin/[, also known as /usr/bin/test. There may be some differences between the POSIX standard conditional expression evaluator and the shell's built-in one, but the built-in one is definitely not going to evaluate a double-quoted string as a command just like that.

Thanks. I wasn't able to get it working with the wc -l bit, but by changing it to
code:
if [[ $(ssh -q -t "$i" find /opt/bmc/scripts/ -name check-var-crash-files.sh) = "" ]]
I was able to make it work with the correct container for the function.

Ashex
Jun 25, 2007

These pipes are cleeeean!!!

fletcher posted:

For my servers on ec2 I have to run mkfs to make the EBS mounts usable, and it's the only step of provisioning that I have not automated. I am scared of adding mkfs commands to my chef recipes though. Obviously I can do testing to make sure everything works as expected and I'm not gonna accidentally blow away any data (which is backed up anyways) but...Is there a particular way I should run mkfs to make it less dangerous?

There really isn't any way for mkfs to not be dangerous, you'll have to add checks to look for a partition table and see if any of the volumes are mounted or mountable.

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb

Ashex posted:

There really isn't any way for mkfs to not be dangerous, you'll have to add checks to look for a partition table and see if any of the volumes are mounted or mountable.

What's a good way to perform those checks?

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
I'm having some trouble with runit, not really sure how to debug it. I'm trying to use the nginx cookbook to install nginx from source, but it's failing. If I do a ps aux | grep nginx after that, I see this ugly mess:
code:
vagrant@vagrant:~$ ps aux | grep nginx
root     14961  0.0  0.0    188    28 ?        Ss   17:25   0:00 runsvdir -P /etc/service log: xist?runsv nginx: fatal: unable to start log/./run: file does not e
rt ./run: file does not exist?runsv nginx: fatal: unable to start log/./run: file does not exist?runsv nginx: fatal: unable to start ./run: file does not exist?ru
./run: file does not exist?runsv nginx: fatal: unable to start ./run: file does not exist?
root     14977  0.2  0.0    164    32 ?        Ss   17:25   0:01 runsv nginx
vagrant  16417  0.0  0.0   9388   928 pts/3    S+   17:32   0:00 grep --color=auto nginx
Here's the run script it generated:
code:
vagrant@vagrant:~$ cat /etc/service/nginx/run
#!/bin/sh
exec 2>&1
exec /opt/nginx-1.4.4/sbin/nginx -c /etc/nginx/nginx.conf
If I run sudo /opt/nginx-1.4.4/sbin/nginx -c /etc/nginx/nginx.conf manually, it seems to work fine.

Not sure if maybe the issue is this one?
code:
vagrant@vagrant:~$ cat /etc/service/nginx/log/run
#!/bin/sh
exec svlogd -tt ./main
edit: hmm it also seems to fail if I change the init_style to upstart

fletcher fucked around with this message at 03:24 on Jan 30, 2014

fletcher
Jun 27, 2003

ken park is my favorite movie

Cybernetic Crumb
Tried it again with the latest version of chef, 11.8.2, and it seems to work fine now.

Adbot
ADBOT LOVES YOU

Vulture Culture
Jul 14, 2003

I was never enjoying it. I only eat it for the nutrients.

fletcher posted:

I'm trying to use the nginx cookbook to install nginx from source
It is the worst when cookbook authors do this, and this is the worst thing about the Chef community.

  • 1
  • 2
  • 3
  • 4
  • 5
  • Post
  • Reply