Re: [gentoo-user] Re: latest gentoo-sources and nvidia ?

2014-03-31 Thread Stefan G. Weichinger
Am 31.03.2014 03:21, schrieb Jonathan Callen:

 USE=acpi does one thing, and one thing only: adds a dependency on
 sys-power/acpid. USE=multilib installs the 32-bit libGL.so, etc.
 libraries on amd64 (so that `eselect opengl` can set them for both
 amd64 and x86).

I think I don't need that ... at least I don't know. Won't hurt much,
anyway ... a few more files, right? I think I had that set for years now.

Thanks, Stefan





[gentoo-user] Script to tar.tgz /etc, works run manually, broken when run from cron

2014-03-31 Thread Tanstaafl

Hi all,

Ok, this is really irritating me...

I have a script that simply performs some backups. The commands are like 
this:


# perform tar.tgz backup of /etc
tar -czpvf $BKUP_DIR_etc/$BKUP_DateTime-dev-ecat-etc.tgz /etc

When I run this script manually, it does what it is supposed to, and the 
resulting file is about 500K.


When it runs from cron (roots crontab), it results in a 20 byte (empty) 
file.


So what am I missing/doing wrong?



Re: [gentoo-user] Script to tar.tgz /etc, works run manually, broken when run from cron

2014-03-31 Thread Neil Bothwick
On Mon, 31 Mar 2014 07:01:48 -0400, Tanstaafl wrote:

 I have a script that simply performs some backups. The commands are
 like this:
 
 # perform tar.tgz backup of /etc
 tar -czpvf $BKUP_DIR_etc/$BKUP_DateTime-dev-ecat-etc.tgz /etc
 
 When I run this script manually, it does what it is supposed to, and
 the resulting file is about 500K.
 
 When it runs from cron (roots crontab), it results in a 20 byte (empty) 
 file.

You're running tar with -v so it should produce output no matter what it
does. Is that mailed to you? What does it say?

You could add set -x at the start of the script for an even more
verbose report.


-- 
Neil Bothwick

Did you know that eskimos have 17 different words for linguist?


signature.asc
Description: PGP signature


Re: [gentoo-user] Script to tar.tgz /etc, works run manually, broken when run from cron

2014-03-31 Thread Helmut Jarausch

On 03/31/2014 01:01:48 PM, Tanstaafl wrote:

Hi all,

Ok, this is really irritating me...

I have a script that simply performs some backups. The commands are  
like this:


# perform tar.tgz backup of /etc
tar -czpvf $BKUP_DIR_etc/$BKUP_DateTime-dev-ecat-etc.tgz /etc

When I run this script manually, it does what it is supposed to, and  
the resulting file is about 500K.


When it runs from cron (roots crontab), it results in a 20 byte  
(empty) file.


So what am I missing/doing wrong?



This is what I do when debugging such things

put

echo $BKUP_DIR_etc/$BKUP_DateTime-dev-ecat-etc.tgz /tmp/cron.LOG
into an executable script and run it with
at now+1minute
and check /tmp/cron.LOG

perhaps one of $BKUP_DIR_etc or $BKUP_DateTime-dev-ecat-etc
isn't know in that environment

Helmut




Re: [gentoo-user] Script to tar.tgz /etc, works run manually, broken when run from cron

2014-03-31 Thread Tanstaafl

On 3/31/2014 7:13 AM, Neil Bothwick n...@digimed.co.uk wrote:

On Mon, 31 Mar 2014 07:01:48 -0400, Tanstaafl wrote:

I have a script that simply performs some backups. The commands are
like this:

# perform tar.tgz backup of /etc
tar -czpvf $BKUP_DIR_etc/$BKUP_DateTime-dev-ecat-etc.tgz /etc

When I run this script manually, it does what it is supposed to, and
the resulting file is about 500K.

When it runs from cron (roots crontab), it results in a 20 byte (empty)
file.


You're running tar with -v so it should produce output no matter what it
does. Is that mailed to you? What does it say?


I don't have these mailed to me, but like I said, it absolutely does 
produce output - the problem is, when run from cron, the resulting file 
is only 20 bytes (empty), when I run the exact same script manhually, it 
produces a file of about 500K that containes the contents of /etc..


On 3/31/2014 7:27 AM, Helmut Jarausch jarau...@igpm.rwth-aachen.de wrote:
 perhaps one of $BKUP_DIR_etc or $BKUP_DateTime-dev-ecat-etc
 isn't know in that environment

They are - see above...



[gentoo-user] systemd-networkd: simpler config for my network

2014-03-31 Thread Stefan G. Weichinger

Aside from all the discussions around systemd, I simply gave the new
systemd-networkd a try.

It helped me to simplify my config for my main machine where I run KVM
for virtualization and need a network bridge:

http://www.oops.co.at/en/publications/systemd-networkd-network-configuration-for-a-kvm-server

Maybe someone else can make use of that as well.

Stefan



Re: [gentoo-user] Script to tar.tgz /etc, works run manually, broken when run from cron

2014-03-31 Thread Neil Bothwick
On Mon, 31 Mar 2014 08:01:03 -0400, Tanstaafl wrote:

  You're running tar with -v so it should produce output no matter what
  it does. Is that mailed to you? What does it say?  
 
 I don't have these mailed to me, but like I said, it absolutely does 
 produce output - the problem is, when run from cron, the resulting file 
 is only 20 bytes (empty), when I run the exact same script manhually,
 it produces a file of about 500K that containes the contents of /etc..

So you have no idea what output the script is producing when run from
cron? Not a good plan when it is not working :(

When a script runs from the terminal but not from cron it is almost
always because of a difference in the environments, but without seeing
its output we can only guess at the problem.


-- 
Neil Bothwick

- How many surrealists does it take to change a light bulb?
- Two: one to hold the giraffe, the other to fill the bathtub with
  lots of brightly colored machine tools.


signature.asc
Description: PGP signature


Re: [gentoo-user] systemd-networkd: simpler config for my network

2014-03-31 Thread Nilesh Govindrajan
On 31-Mar-2014 5:45 pm, Stefan G. Weichinger li...@xunil.at wrote:


 Aside from all the discussions around systemd, I simply gave the new
 systemd-networkd a try.

 It helped me to simplify my config for my main machine where I run KVM
 for virtualization and need a network bridge:


http://www.oops.co.at/en/publications/systemd-networkd-network-configuration-for-a-kvm-server

 Maybe someone else can make use of that as well.

 Stefan


IMHO, tap interfaces are not required there because they get created
automatically as needed when you specify the bridge to which QEMU must
attach to. It's an overkill.


Re: [gentoo-user] systemd-networkd: simpler config for my network

2014-03-31 Thread Stefan G. Weichinger
Am 31.03.2014 14:17, schrieb Nilesh Govindrajan:
 On 31-Mar-2014 5:45 pm, Stefan G. Weichinger li...@xunil.at wrote:


 Aside from all the discussions around systemd, I simply gave the new
 systemd-networkd a try.

 It helped me to simplify my config for my main machine where I run KVM
 for virtualization and need a network bridge:


 http://www.oops.co.at/en/publications/systemd-networkd-network-configuration-for-a-kvm-server

 Maybe someone else can make use of that as well.

 Stefan

 
 IMHO, tap interfaces are not required there because they get created
 automatically as needed when you specify the bridge to which QEMU must
 attach to. It's an overkill.

So the openrc-example might be simplified? ok with me ... does anyone
confirm?


Thanks, Stefan




Re: [gentoo-user] Script to tar.tgz /etc, works run manually, broken when run from cron

2014-03-31 Thread Daniel Frey
On 03/31/2014 04:01 AM, Tanstaafl wrote:
 Hi all,
 
 Ok, this is really irritating me...
 
 I have a script that simply performs some backups. The commands are like
 this:
 
 # perform tar.tgz backup of /etc
 tar -czpvf $BKUP_DIR_etc/$BKUP_DateTime-dev-ecat-etc.tgz /etc
 
 When I run this script manually, it does what it is supposed to, and the
 resulting file is about 500K.
 
 When it runs from cron (roots crontab), it results in a 20 byte (empty)
 file.
 
 So what am I missing/doing wrong?
 

You need to use the full path to commands in your script or set an
environment variable. In my case using full paths to executables was enough.

i.e.

# perform tar.tgz backup of /etc
/bin/tar -czpvf $BKUP_DIR_etc/$BKUP_DateTime-dev-ecat-etc.tgz /etc

Dan




Re: [gentoo-user] Script to tar.tgz /etc, works run manually, broken when run from cron

2014-03-31 Thread Alan McKinnon
On 31/03/2014 13:01, Tanstaafl wrote:
 Hi all,
 
 Ok, this is really irritating me...
 
 I have a script that simply performs some backups. The commands are like
 this:
 
 # perform tar.tgz backup of /etc
 tar -czpvf $BKUP_DIR_etc/$BKUP_DateTime-dev-ecat-etc.tgz /etc
 
 When I run this script manually, it does what it is supposed to, and the
 resulting file is about 500K.
 
 When it runs from cron (roots crontab), it results in a 20 byte (empty)
 file.
 
 So what am I missing/doing wrong?
 
 

It's almost always the same two things that cause this:

1. cron doesn't give you an environment so there's no $PATH. Other
posters covered this nicely.

2. I had this one just last week in fact - pwd is not what you think it
is. In cron it ends up being / so the solution was again to use full
paths. In my case, I had a config file listed on the command line.



-- 
Alan McKinnon
alan.mckin...@gmail.com




Re: [gentoo-user] Re: latest gentoo-sources and nvidia ?

2014-03-31 Thread Stefan G. Weichinger
Am 31.03.2014 09:38, schrieb Stefan G. Weichinger:
 Am 31.03.2014 03:21, schrieb Jonathan Callen:
 
 USE=acpi does one thing, and one thing only: adds a dependency on
 sys-power/acpid. USE=multilib installs the 32-bit libGL.so, etc.
 libraries on amd64 (so that `eselect opengl` can set them for both
 amd64 and x86).
 
 I think I don't need that ... at least I don't know. Won't hurt much,
 anyway ... a few more files, right? I think I had that set for years now.

Ha, and now there is gentoo-sources-3.14.0 ;-)
Will that work with these nvidia-drivers as well?

I will see in a few minutes.




Re: [gentoo-user] Re: latest gentoo-sources and nvidia ?

2014-03-31 Thread Stefan G. Weichinger
Am 31.03.2014 19:52, schrieb Stefan G. Weichinger:
 Am 31.03.2014 09:38, schrieb Stefan G. Weichinger:
 Am 31.03.2014 03:21, schrieb Jonathan Callen:

 USE=acpi does one thing, and one thing only: adds a dependency on
 sys-power/acpid. USE=multilib installs the 32-bit libGL.so, etc.
 libraries on amd64 (so that `eselect opengl` can set them for both
 amd64 and x86).

 I think I don't need that ... at least I don't know. Won't hurt much,
 anyway ... a few more files, right? I think I had that set for years now.
 
 Ha, and now there is gentoo-sources-3.14.0 ;-)
 Will that work with these nvidia-drivers as well?
 
 I will see in a few minutes.

nope. nvidia-drivers don't even build. *sigh*




[gentoo-user] Fwd: sandbox access violations while running matlab binary installer

2014-03-31 Thread Kfir Lavi
Hi all,
I'm trying to create an ebuild to install matlab MCR on gentoo.
The installer InstallShileld try to create directory /root/InstallShield ;-)
 mkdir is run by java binary that try this. So I have no access to change
it.
There is no option to provide InstallShield it's relative install path.
I can provide matlab's install path and other options, but this made
permanent /root/InstallShield

What can I do?

Thanks,
Kfir


Re: [gentoo-user] Fwd: sandbox access violations while running matlab binary installer

2014-03-31 Thread Alan McKinnon
On 31/03/2014 20:25, Kfir Lavi wrote:
 Hi all,
 I'm trying to create an ebuild to install matlab MCR on gentoo.
 The installer InstallShileld try to create directory /root/InstallShield ;-)
 mkdir is run by java binary that try this. So I have no access to change it.
 There is no option to provide InstallShield it's relative install path.
 I can provide matlab's install path and other options, but this made
 permanent /root/InstallShield
 
 What can I do?
 
 Thanks,
 Kfir
 

As pointed out in -dev, let's first establish if the installer really
wants to write to /root or if it's actually ${HOME}

Do you get the identical error if you run the installer as a regular user?

-- 
Alan McKinnon
alan.mckin...@gmail.com