Re: [CentOS] /etc/gai.conf fails to prefer IPv4 over IPv6 for NFS

2018-06-09 Thread Gordon Messmer

On 06/09/2018 07:51 AM, Steve Rikli wrote:


I had hopes for gai.conf as the more universal solution, but apparently
it's not useable here.


gai.conf works as intended for most applications, here.  For example, if 
I uncomment the block of "precedence" lines, and swap between "10" and 
"100" for the last line, then "telnet www.google.com 80" will connect to 
either the IPv4 or IPv6 address based on that value.  Have you verified 
that works for you?  Do the results for that test not match the results 
for NFS mounts?

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] /etc/gai.conf fails to prefer IPv4 over IPv6 for NFS

2018-06-09 Thread Steve Rikli
In article ,
Gordon Messmer   wrote:
>On 06/08/2018 03:23 PM, Steve Rikli wrote:
>>
>> This seems the most likely explanation, I'd just like to know for certain
>> before I give up on gai.conf and restort to disabling IPv6 or other
>> workarounds (e.g. /etc/nfsmount.conf).
>
>Have you tried specifying "proto=tcp" as a mount option?  That *should* 
>limit the client to IPv4.

Yes -- that's the other workaround I tried successfully.  Either in
auto.master mount options for the map, or Defaultproto=tcp in nfsmount.conf
works as desired.

I had hopes for gai.conf as the more universal solution, but apparently
it's not useable here.

Thanks,
sr.

___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Custom ISO With Post Installation Scripts

2018-06-09 Thread Earl Ramirez
On Sat, 2018-06-09 at 15:10 +0200, Ulf Volmer wrote:
> On 09.06.2018 14:48, Earl Ramirez wrote:
> 
> > # copy scripts to the destintion of the server
> > cp -v $SRCDIR/postinstall/script1.sh >
> > $DSTDIR/etc/rc.d/rc.local/script1.sh
> 
> are you sure about this line? rc.local must be a file, not a
> directory.
> 
> best regards
> Ulf

Thanks Ulf

That was a typo on the email

cp -v $SRCDIR/postinstall/snipeit.sh $DSTDIR/etc/rc.d/rc.local

# Make scripts executable
chmod +x $DSTDIR/etc/rc.d/rc.local


-- 
Earl Ramirez 

signature.asc
Description: This is a digitally signed message part
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] Custom ISO With Post Installation Scripts

2018-06-09 Thread Ulf Volmer
On 09.06.2018 14:48, Earl Ramirez wrote:

> # copy scripts to the destintion of the server
> cp -v $SRCDIR/postinstall/script1.sh > $DSTDIR/etc/rc.d/rc.local/script1.sh

are you sure about this line? rc.local must be a file, not a directory.

best regards
Ulf
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


[CentOS] Custom ISO With Post Installation Scripts

2018-06-09 Thread Earl Ramirez
Dear All

I have been working on a custom ISO with kickstart and a couple of post
installation scripts and would like to have the script run before the
login prompt.

The custom ISO works; however, the scripts fails because some of the
services, e.g. mariadb does not start before the server installation
has been completed and rebooted; therefore, I have been putting the
scripts in /etc/profile.d/ and after logging in the scripts will
execute and upon completion of the script will be deleted from
/etc/profile.d/.

DuckDuckGo suggested that I copy the script to /etc/rc.d/rc.local and
make it executable; however, I have tried that a few times and the
script simply does not execute.

Below is an excerpt from the ks.cfg.


export SRCDIR="/run/install/repo"
export DSTDIR="/mnt/sysimage"

# copy scripts to the destintion of the server
cp -v $SRCDIR/postinstall/script1.sh
$DSTDIR/etc/rc.d/rc.local/script1.sh

# Make scripts executable
chmod +x $DSTDIR/etc/rc.d/rc.local.sh

Since this is a ISO for a community project, don't think that tools
such as Ansible, Chef, Puppet, etc. will work here. 

Also, it is a one time execution; therefore, I did not consider using
systemd because the goal would be to have visibility while the script
is running just as I see after I login; however, just need the script
to be executed after the OS was installed and restarted and before the
login prompt.

All suggestions are welcome.

Thanks in advance.
-- 
Earl Ramirez 

signature.asc
Description: This is a digitally signed message part
___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos


Re: [CentOS] rpmbuild --define | some rpm sorcerer around?

2018-06-09 Thread Phil Perry

On 08/06/18 22:54, lejeczek wrote:



On 08/06/18 19:38, Phil Perry wrote:

On 08/06/18 15:54, lejeczek wrote:

hi

how do you pass vars to rpmbuild for definition? eg

rpmbuild --define \'"${_definition2}"\'

I've been fiddling with ways to escape, but none is fricking working..
I mean, rpmbuild rushes to work(no errors nor failure) so if you try 
just the command line do not believe it, because later as it executes 
%if you will see process does not see these definitions.


many thanks, L


I'm not sure what you are trying to define above.

Normal convention where one wishes to define _foobar as "foo" for 
example would be:


rpmbuild --define '_foobar foo'

or generically

rpmbuild --define 'SomeVariable SomeValue'

Hope that helps


Try to pass bash var to rpmbuild, eg:

$ _def1="_me no"
$ rpmbuild --define ${_def1}




I assume you are doing this in a bash script?

${_def1} may need to be quoted as it contains a space.

But for that I would do the following to make it more readable:

ME="no"
rpmbuild --define '_me ${ME}'


or if ${ME} contains spaces:

rpmbuild --define '_me "${ME}"'


___
CentOS mailing list
CentOS@centos.org
https://lists.centos.org/mailman/listinfo/centos