Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Tue 13 Nov 2018, 16:53
All times are UTC - 4
 Forum index » Off-Topic Area » Programming
if [ -n "$PMLINK" -a -x $PMDIR/plugin-container_exec ];then
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [3 Posts]  
Author Message
s243a

Joined: 02 Sep 2014
Posts: 1268

PostPosted: Sat 23 Dec 2017, 06:10    Post subject:  if [ -n "$PMLINK" -a -x $PMDIR/plugin-container_exec ];then
Subject description: What does it do? /usr/local/bin/palemoon-plugin-contianer.sh
 

I don't understand what the following test condtion does

Code:

if [ -n "$PMLINK" -a -x $PMDIR/plugin-container_exec ];then



in the palemoon script:
/usr/local/bin/palemoon-plugin-container.sh

Here is the full code:

Code:

#!/bin/sh

PMDIR=''
if grep -q ' sse2 ' /proc/cpuinfo; then
   [ -x /opt/palemoon/palemoon ] && PMDIR=/opt/palemoon
else
   [ -x /usr/local/palemoon/palemoon ] && PMDIR=/usr/local/palemoon
fi

if [ -n "$PMDIR" ];then
   PMLINK="$(which palemoon 2>/dev/null)"
   if [ -n "$PMLINK" -a -x $PMDIR/plugin-container_exec ];then
      if [ -h $PMLINK ] \
        && [ "$(basename $(readlink $PMLINK))" = 'palemoon.sh' ];then
         export LC_ALL=C
         exec /usr/lib/glibc219/lib/ld-linux.so.2 --library-path /usr/lib/glibc219/lib:/usr/lib/glibc219/usr/lib:/usr/lib/glibc219/libstdc++:/usr/X11R7/lib:$PMDIR $PMDIR/plugin-container_exec "$@" #exec avoids segfault after flashplayer
      fi
   fi
fi



and this comes with the version of palemoon found in the installer pet for superlupu4.

What I want to know is when will the following line of code be executed
Code:

exec /usr/lib/glibc219/lib/ld-linux.so.2 --library-path /usr/lib/glibc219/lib:/usr/lib/glibc219/usr/lib:/usr/lib/glibc219/libstdc++:/usr/X11R7/lib:$PMDIR $PMDIR/plugin-container_exec "$@" #exec avoids segfault after flashplayer


because if this code never gets executed then I can see why youtube is crashing with a no child process error.

Last edited by s243a on Sat 23 Dec 2017, 07:03; edited 1 time in total
Back to top
View user's profile Send private message 
MochiMoppel


Joined: 26 Jan 2011
Posts: 1677
Location: Japan

PostPosted: Sat 23 Dec 2017, 06:58    Post subject: Re: if [ -n "$PMLINK" -a -x $PMDIR/plugin-container_exec ];then
Subject description: What does it do? /usr/local/bin/palemoon-plugin-contianer.sh
 

s243a wrote:
I don't understand what the following test condtion does
Code:

if [ -n "$PMLINK" -a -x $PMDIR/plugin-container_exec ];then
If variable "$PMLINK" is not empty and file /opt/palemoon/plugin-container_exec exists and is executable; then...

The earlier line PMDIR=/opt/palemoon makes no sense to me. Why did the script check for the installation directory and then ignores whatever the result and hardcodes the directory?

Quote:
What I want to know is when will the following line of code be executed
Code:

exec /usr/lib/glibc219/lib/ld-linux.so.2 --library-path /usr/lib/glibc219/lib:/usr/lib/glibc219/usr/lib:/usr/lib/glibc219/libstdc++:/usr/X11R7/lib:$PMDIR $PMDIR/plugin-container_exec "$@" #exec avoids segfault after flashplayer

Executed
if a symlink named palemoon exists in the $PATH and this symlink points to an executable file palemoon.sh
and
if executable file /opt/palemoon/plugin-container_exec exists
and of course
if the long exec line is valid code
Back to top
View user's profile Send private message 
s243a

Joined: 02 Sep 2014
Posts: 1268

PostPosted: Sat 23 Dec 2017, 07:06    Post subject: Re: if [ -n "$PMLINK" -a -x $PMDIR/plugin-container_exec ];then
Subject description: What does it do? /usr/local/bin/palemoon-plugin-contianer.sh
 

MochiMoppel wrote:
s243a wrote:
I don't understand what the following test condtion does
Code:

if [ -n "$PMLINK" -a -x $PMDIR/plugin-container_exec ];then
If variable "$PMLINK" is not empty and file /opt/palemoon/plugin-container_exec exists and is executable; then...

Thankyou Smile

Quote:

The earlier line PMDIR=/opt/palemoon makes no sense to me. Why did the script check for the installation directory and then ignores whatever the result and hardcodes the directory?


That might have been me that put that there. I didn't think the test for the installation directory was working. I deleted it in the above post to avoid confusion.

Quote:

Quote:
What I want to know is when will the following line of code be executed
Code:

exec /usr/lib/glibc219/lib/ld-linux.so.2 --library-path /usr/lib/glibc219/lib:/usr/lib/glibc219/usr/lib:/usr/lib/glibc219/libstdc++:/usr/X11R7/lib:$PMDIR $PMDIR/plugin-container_exec "$@" #exec avoids segfault after flashplayer

Executed
if a symlink named palemoon exists in the $PATH and this symlink points to an executable file palemoon.sh
and
if executable file /opt/palemoon/plugin-container_exec exists
and of course
if the long exec line is valid code
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [3 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Off-Topic Area » Programming
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0865s ][ Queries: 11 (0.0218s) ][ GZIP on ]