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 Wed 23 Apr 2014, 13:30
All times are UTC - 4
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
sfs_load-2.0 on-the-fly
Post new topic   Reply to topic View previous topic :: View next topic
Page 8 of 19 [274 Posts]   Goto page: Previous 1, 2, 3, ..., 6, 7, 8, 9, 10, ..., 17, 18, 19 Next
Author Message
jpeps

Joined: 31 May 2008
Posts: 3219

PostPosted: Mon 28 Feb 2011, 03:41    Post subject:  

Shep wrote:

I think you have in haste simply duplicated the last part of the first example?


not haste Smile I ran the root shell as "bash" instead of "sh" to confirm that both act similarly.

Quote:
Any idea why the behaviour is as you found it? The mystery has merely shifted focus. Smile


Yes; it needs .wh\* to find it when not in root shell. For some reason, in root shell '*' doesn't need to be escaped.
Code:

sudo find /initrd/pup_rw  -mindepth 2 -type f -name .wh\*
/initrd/pup_rw/var/local/icons/.wh..wh..opq
/initrd/pup_rw/dev/usb/.wh.lp0
/initrd/pup_rw/etc/.wh.windowmanager.openbox
/initrd/pup_rw/etc/ssl/misc/.wh..wh..opq
/initrd/pup_rw/usr/lib/openoffice.org3/share/uno_packages/cache/uno_packages/.wh.SH1dMc_
/initrd/pup_rw/usr/lib/openoffice.org3/share/uno_packages/cache/uno_packages/.wh.SH1dMc
/initrd/pup_rw/usr/lib/engines/.wh..wh..opq


Shep wrote:

The dot is not a wildcard to the shell, so escaping it with a backslash achieves nothing.
Laughing
Last edited by jpeps on Mon 28 Feb 2011, 04:13; edited 1 time in total
Back to top
View user's profile Send private message 
Q5sys


Joined: 11 Dec 2008
Posts: 1046

PostPosted: Mon 28 Feb 2011, 04:03    Post subject: Re: finding whiteout  

jpeps wrote:
[edit: Actually, I think this has more to do with running a user shell on top of the root shell. If I switch to sh shell with user "spot", it's the same as it was with bash.


And what exactly is the purpose of opening a shell to open a shell as you were doing? Am I missing something?

As far as the puppies ive used in the past including LHP currently... sh is a symlink to bash.

_________________



My PC is for sale
Back to top
View user's profile Send private message 
Shep

Joined: 08 Nov 2008
Posts: 842
Location: GIRT-BY-SEA

PostPosted: Mon 28 Feb 2011, 05:11    Post subject:  

jpeps wrote:

Yes; it needs .wh\* to find it when not in root shell. For some reason, in root shell '*' doesn't need to be escaped.

Hmm. Surely there isn't an environment setting such as expandwildcards=false Question
Though different for root and spot?

So we are no nearer understanding the apparent anomaly?

What about:
Code:
 USER=root find /initrd/pup_rw  -mindepth 2 -type f -name .wh*
 USER=spot find /initrd/pup_rw  -mindepth 2 -type f -name .wh*


Shep wrote:

The dot is not a wildcard to the shell, so escaping it with a backslash achieves nothing.

A dot is not an asterisk. Cool
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3219

PostPosted: Mon 28 Feb 2011, 12:11    Post subject:  

Shep wrote:


What about:
Code:
 USER=root find /initrd/pup_rw  -mindepth 2 -type f -name .wh*
The dot is not a wildcard to the shell, so escaping it with a backslash achieves nothing.
 USER=spot find /initrd/pup_rw  -mindepth 2 -type f -name .wh*

no cigar

Quote:

"The dot is not a wildcard to the shell, so escaping it with a backslash achieves nothing."

A dot is not an asterisk. Cool

right...should have escaped the wildcard (although you can't use both quotes and '\*'). That said, dots are special characters in search patterns, so it's not a bad idea to get used to escaping them as well. Always better to write safe code to begin with that will cover all situations.
Back to top
View user's profile Send private message 
Shep

Joined: 08 Nov 2008
Posts: 842
Location: GIRT-BY-SEA

PostPosted: Mon 28 Feb 2011, 20:24    Post subject:  

jpeps wrote:
no cigar

Realised as soon as I'd posted that it wouldn't. The su command exists for a reason.
I'm trying to replicate the essence of your finding on Wary. Should be possible, you reckon?

So I get to a shell (shouldn't matter whether sh or bash, you say) and ....
Code:
sh-3.00# echo $USER
root
sh-3.00# find /initrd/pup_rw  -mindepth 2 -type f -name .wh*
/initrd/pup_rw/lib/modules/all-firmware/.wh.cdcacm.tar.gz
/initrd/pup_rw/lib/modules/all-firmware/.wh.hso.tar.gz
/initrd/pup_rw/lib/modules/all-firmware/.wh.ipwireless.tar.gz
/initrd/pup_rw/lib/modules/all-firmware/.wh.nozomi.tar.gz
/initrd/pup_rw/lib/modules/all-firmware/.wh.usbserial.tar.gz
/initrd/pup_rw/dev/.wh.sr1
sh-3.00# su spot
sh-3.00$ echo $USER
spot
sh-3.00$ find /initrd/pup_rw  -mindepth 2 -type f -name .wh* 2>/dev/null
/initrd/pup_rw/lib/modules/all-firmware/.wh.cdcacm.tar.gz
/initrd/pup_rw/lib/modules/all-firmware/.wh.hso.tar.gz
/initrd/pup_rw/lib/modules/all-firmware/.wh.ipwireless.tar.gz
/initrd/pup_rw/lib/modules/all-firmware/.wh.nozomi.tar.gz
/initrd/pup_rw/lib/modules/all-firmware/.wh.usbserial.tar.gz
/initrd/pup_rw/dev/.wh.sr1
sh-3.00$

The fact that I needed to discard lots of diagnostic messages while your spot didn't elicit any permission-denied messages gives pause for thought. Confused Why was your spot able to descend into directories that presumably have root-only permissions? That's probably a more important question. Exclamation Exclamation

Any thoughts on that?
Back to top
View user's profile Send private message 
Shep

Joined: 08 Nov 2008
Posts: 842
Location: GIRT-BY-SEA

PostPosted: Mon 28 Feb 2011, 20:26    Post subject: Re: finding whiteout  

Q5sys wrote:
And what exactly is the purpose of opening a shell to open a shell as you were doing?

How would you have done it?
Back to top
View user's profile Send private message 
jpeps

Joined: 31 May 2008
Posts: 3219

PostPosted: Mon 28 Feb 2011, 21:10    Post subject:  

Shep wrote:

The fact that I needed to discard lots of diagnostic messages while your spot didn't elicit any permission-denied messages gives pause for thought. Confused Why was your spot able to descend into directories that presumably have root-only permissions? That's probably a more important question. Exclamation Exclamation

Any thoughts on that?


requires sudoers for root privileges:

http://murga-linux.com/puppy/viewtopic.php?t=60258
Back to top
View user's profile Send private message 
Q5sys


Joined: 11 Dec 2008
Posts: 1046

PostPosted: Mon 28 Feb 2011, 21:59    Post subject: Re: finding whiteout  

Shep wrote:
Q5sys wrote:
And what exactly is the purpose of opening a shell to open a shell as you were doing?

How would you have done it?


Um... I'm not understanding the reason of opening a shell to open a shell. Hence my question of what im missing. What is the reason you cant open one shell and issue the commands there? Whats the purpose of opening a nested shell inside the first one? Thats what Im not getting.

Nested shells make me think of the yo dawg meme...

_________________



My PC is for sale
Back to top
View user's profile Send private message 
Shep

Joined: 08 Nov 2008
Posts: 842
Location: GIRT-BY-SEA

PostPosted: Tue 01 Mar 2011, 03:34    Post subject: Re: finding whiteout  

Q5sys wrote:
Um... I'm not understanding the reason of opening a shell to open a shell.

It's more a case of first opening a console, then running the desired shell. The fact that the console defaults to opening with bash means that you need to get sh running if you want to test sh.

It could be done differently, but who cares? Shells are just programs, so for the case in question, it shouldn't be a problem. Finish with exit to return to bash.

Could use exec sh if you don't need to return to bash.

Smile
Back to top
View user's profile Send private message 
Q5sys


Joined: 11 Dec 2008
Posts: 1046

PostPosted: Tue 01 Mar 2011, 19:20    Post subject: Re: finding whiteout  

Shep wrote:
Q5sys wrote:
Um... I'm not understanding the reason of opening a shell to open a shell.

It's more a case of first opening a console, then running the desired shell. The fact that the console defaults to opening with bash means that you need to get sh running if you want to test sh.

It could be done differently, but who cares? Shells are just programs, so for the case in question, it shouldn't be a problem. Finish with exit to return to bash.

Could use exec sh if you don't need to return to bash.

Smile


Ok I ask, because Im hoping to further educate myself about this. So dont think i'm being a smart ass. lol.
What benefits are there to opening a shell within a shell versus using the exec command? In the past when I needed to open a shell and run something (like htop for a simple example) I've used exec. Is there any benefit to nesting shells?

ps... sorry to hijack your thread. Smile

_________________



My PC is for sale
Back to top
View user's profile Send private message 
jim3630


Joined: 13 Feb 2011
Posts: 792
Location: Northern Nevada

PostPosted: Tue 01 Mar 2011, 23:54    Post subject:  

shinobar, thanks for the pet it worked in my fatdog 64 511 without a hitch today. what a work saver! thanks again jim
Back to top
View user's profile Send private message 
Shep

Joined: 08 Nov 2008
Posts: 842
Location: GIRT-BY-SEA

PostPosted: Wed 02 Mar 2011, 00:31    Post subject: Re: finding whiteout  

Q5sys wrote:
What benefits are there to opening a shell within a shell versus using the exec command?

Well, there's less typing for a start. Wink

No great drawback as far as I can see, provided you are not running low on memory.

It means that you can test a bit of code (e.g., by running it in various shells, ksh, zsh, dash, ash, bash, ...) then return to what you were doing. It's a straightforward way to inherit data, if that's desired. Inheritence goes only one way:
Code:
# echo $0
bash
# echo $word

# export word
# word='Some important string or data'
# echo $word
Some important string or data
# sh
# echo $word
Some important string or data
# word='changed'
# echo $word
changed
# exit
exit
# echo $word
Some important string or data
# echo $0
bash
#

HTH
Back to top
View user's profile Send private message 
mavrothal


Joined: 24 Aug 2009
Posts: 1388

PostPosted: Thu 03 Mar 2011, 18:45    Post subject: v0.9 fails in pupmode 6  

I see the big warning in v0.9 that in pupmode 6 is experimental, but it simply fails. "Failed to mount /initrd/pup_rw/name.sfs on /initrd/pup_roX" is all I get Crying or Very sad
v0.8 with the little addition was working OK...

_________________
Kids all over the world go around with an XO laptop. They deserve one puppy (or many) too Very Happy
Back to top
View user's profile Send private message 
shinobar


Joined: 28 May 2009
Posts: 2385
Location: Japan

PostPosted: Thu 10 Mar 2011, 03:59    Post subject: Re: v0.9 fails in pupmode 6  

mavrothal wrote:
I see the big warning in v0.9 that in pupmode 6 is experimental, but it simply fails. "Failed to mount /initrd/pup_rw/name.sfs on /initrd/pup_roX" is all I get Crying or Very sad

Thanks mavrothal for the report, but i cannot reproduce your problem.
I tested sfs_load-0.9 with wary-503q on a virtual PC and successfully loaded sfs under PUPMODE=6... Question

_________________
Google Chrome portable
Downloads for Puppy Linux http://shino.pos.to/linux/downloads.html
Back to top
View user's profile Send private message Visit poster's website 
mhanifpriatama

Joined: 22 Jan 2011
Posts: 60

PostPosted: Sat 12 Mar 2011, 04:32    Post subject:  

Just report. I try in my lucid puppy 520, fresh frugal install. And run.
I would be very happy if can click once, then run the program directly.
Like at http://portablelinuxapps.org
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 8 of 19 [274 Posts]   Goto page: Previous 1, 2, 3, ..., 6, 7, 8, 9, 10, ..., 17, 18, 19 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Additional Software (PETs, n' stuff) » Utilities
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.1160s ][ Queries: 12 (0.0339s) ][ GZIP on ]