Re: [leaf-devel] possible bug in linuxrc

2005-03-16 Thread Charles Steinkuehler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Erich Titl wrote:
| Hi
|
| There is a possible bug in linuxrc (at least with the busybox of Bering)
| when trying to create and mount the /tmp filesystem.
|
| Here is the output from /linuxrc.err
|
| mount -t tmpfs tmpfs /tmp -o size=20M
| mount: Mounting tmpfs on /tmp failed: Invalid argument
| mount -t tmpfs tmpfs /tmp -o size=20M
|
| I extended linuxrc a little to get the debug info. It appears as if the
| tmpfs mount does not like the parameter substitution used for tmp_size
|
| here is the relevant code
|
| [ $VERBOSE ]  Lecho Generating /tmp  /var/log partitions ...
| echo mount -t tmpfs tmpfs /tmp ${tmp_size:+-o size=$tmp_size} 
| /linuxrc.err
| qt mount -t tmpfs tmpfs /tmp ${tmp_size:+-o size=$tmp_size}
| echo  mount -t tmpfs tmpfs /tmp -o size=$tmp_size  /linuxrc.err
| qt mount -t tmpfs tmpfs /tmp -o size=$tmp_size
|
| as you can see, the second mount appears to work, this is with tmp_size
| set to 20M in leaf.cfg
I suspect the entire -o size=20M is being passed to mount as a single
argument, causing the problem.  Options include splitting the substitution
or using eval, ie:
qt mount -t tmpfs tmpfs /tmp ${tmp_size:+-o} ${tmp_size:+size=$tmp_size}
- -or-
eval qt mount -t tmpfs tmpfs /tmp ${tmp_size:+-o size=$tmp_size}
- -or-
eval qt mount -t tmpfs tmpfs /tmp ${tmp_size:+-o size=$tmp_size}
- --
Charles Steinkuehler
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFCOChsLywbqEHdNFwRAviPAJ9hnQ8SJw5BMRoZLavt/MuRJe/CHwCfcIC0
2z4Q70QGJ5hk+EAYwt5f39E=
=iZQ0
-END PGP SIGNATURE-
---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel


Re: [leaf-devel] possible bug in linuxrc

2005-03-16 Thread Hans Ulrich Niedermann
Charles Steinkuehler [EMAIL PROTECTED] writes:

 Erich Titl wrote:

 | There is a possible bug in linuxrc (at least with the busybox of Bering)
 | when trying to create and mount the /tmp filesystem.
 |
 | Here is the output from /linuxrc.err
 |
 | mount -t tmpfs tmpfs /tmp -o size=20M
 | mount: Mounting tmpfs on /tmp failed: Invalid argument
 | mount -t tmpfs tmpfs /tmp -o size=20M
 |
 | I extended linuxrc a little to get the debug info. It appears as if the
 | tmpfs mount does not like the parameter substitution used for tmp_size
 |
 | here is the relevant code
 |
 | [ $VERBOSE ]  Lecho Generating /tmp  /var/log partitions ...
 | echo mount -t tmpfs tmpfs /tmp ${tmp_size:+-o size=$tmp_size} 
 | /linuxrc.err
 | qt mount -t tmpfs tmpfs /tmp ${tmp_size:+-o size=$tmp_size}
 | echo  mount -t tmpfs tmpfs /tmp -o size=$tmp_size  /linuxrc.err
 | qt mount -t tmpfs tmpfs /tmp -o size=$tmp_size
 |
 | as you can see, the second mount appears to work, this is with tmp_size
 | set to 20M in leaf.cfg

 I suspect the entire -o size=20M is being passed to mount as a single
 argument, causing the problem.

I think it only would be a single argument if there were quotes around
the ${:+} substitution:

[EMAIL PROTECTED]:\w# unset tmp_size; for arg in ${tmp_size:+-o size=$tmp_size} 
foo ${tmp_size:+-o size=$tmp_size}; do echo [$arg]; done 
[foo]
[]
[EMAIL PROTECTED]:\w# tmp_size=20M; for arg in ${tmp_size:+-o size=$tmp_size} 
foo ${tmp_size:+-o size=$tmp_size}; do echo [$arg]; done
[-o]
[size=20M]
[foo]
[-o size=20M]
[EMAIL PROTECTED]:\w# 

(run on my BU box running the standard /bin/sh shell)

However, I'd try leaving out the space after the -o, i.e. I'd run it as

mount -t tmpfs tmpfs /tmp ${tmp_size:+-osize=$tmp_size}

Gru,

Uli


pgpdYNSF5qEi3.pgp
Description: PGP signature


Re: [leaf-devel] possible bug in linuxrc

2005-03-16 Thread Erich Titl
Ulli
good catch
qt mount -t tmpfs tmpfs /tmp ${tmp_size:+-osize=$tmp_size}
works fine here
Charles
may I suggest an update
cheers
Erich
THINK
Püntenstrasse 39
8143 Stallikon
mailto:[EMAIL PROTECTED]
PGP Fingerprint: BC9A 25BC 3954 3BC8 C024  8D8A B7D4 FF9D 05B8 0A16

---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95alloc_id396op=click
___
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel


Re: [leaf-devel] possible bug in linuxrc

2005-03-16 Thread Eric Spakman
Erich,

In Bering-uClibc it is fixed some time ago like this:
qt mount -t tmpfs tmpfs /tmp -o defaults${tmp_size:+,size=$tmp_size}

Eric

 Ulli

 good catch

 qt mount -t tmpfs tmpfs /tmp ${tmp_size:+-osize=$tmp_size}

 works fine here

 Charles

 may I suggest an update

 cheers

 Erich


 THINK
 Püntenstrasse 39
 8143 Stallikon
 mailto:[EMAIL PROTECTED]
 PGP Fingerprint: BC9A 25BC 3954 3BC8 C024  8D8A B7D4 FF9D 05B8 0A16




 ---
 SF email is sponsored by - The IT Product Guide
 Read honest  candid reviews on hundreds of IT Products from real users.
 Discover which products truly live up to the hype. Start reading now.
 http://ads.osdn.com/?ad_ide95alloc_id 396opÀick

 ___
 leaf-devel mailing list
 leaf-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/leaf-devel





---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95alloc_id396op=click

___
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel


Re: [leaf-devel] possible bug in linuxrc

2005-03-16 Thread Eric Spakman
Hi Erich,

Of I'm not mistaken Charles suggested this change some time ago on
this list ;-) But I can't find the mail right now.

Eric

 In Bering-uClibc it is fixed some time ago like this:
 qt mount -t tmpfs tmpfs /tmp -o defaults${tmp_size:+,size=$tmp_size}

 great, was this fed back? I got my version from Charles some time ago.

 Thanks

 Erich

 THINK
 Püntenstrasse 39
 8143 Stallikon
 mailto:[EMAIL PROTECTED]
 PGP Fingerprint: BC9A 25BC 3954 3BC8 C024  8D8A B7D4 FF9D 05B8 0A16




 ---
 SF email is sponsored by - The IT Product Guide
 Read honest  candid reviews on hundreds of IT Products from real users.
 Discover which products truly live up to the hype. Start reading now.
 http://ads.osdn.com/?ad_ide95alloc_id 396opÀick

 ___
 leaf-devel mailing list
 leaf-devel@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/leaf-devel





---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_ide95alloc_id396op=click

___
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel


Re: [leaf-devel] possible bug in linuxrc

2005-03-16 Thread Charles Steinkuehler
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
Eric Spakman wrote:
| Hi Erich,
|
| Of I'm not mistaken Charles suggested this change some time ago on
| this list ;-) But I can't find the mail right now.
|
| Eric
|
| In Bering-uClibc it is fixed some time ago like this:
| qt mount -t tmpfs tmpfs /tmp -o defaults${tmp_size:+,size=$tmp_size}
|
| great, was this fed back? I got my version from Charles some time ago.
The Bering-uClibc guys are currently much better at doing updates than I am.
:)
My Bering-CD image is currently working OK for in-house use, and isn't
really getting updated, although I do try to comment on (and post potential
fixes for) any bugs in the scripts I've written.
- --
Charles Steinkuehler
[EMAIL PROTECTED]
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.0 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFCOK/5LywbqEHdNFwRArv+AKCf6KPyu6I3Lk1ZvIMa1LTifjlUvACggV4s
mmX//nyWC4/Mun+2PcceKII=
=RjDS
-END PGP SIGNATURE-
---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel


[leaf-devel] possible bug in linuxrc

2005-03-15 Thread Erich Titl
Hi
There is a possible bug in linuxrc (at least with the busybox of Bering) 
when trying to create and mount the /tmp filesystem.

Here is the output from /linuxrc.err
mount -t tmpfs tmpfs /tmp -o size=20M
mount: Mounting tmpfs on /tmp failed: Invalid argument
mount -t tmpfs tmpfs /tmp -o size=20M
I extended linuxrc a little to get the debug info. It appears as if the 
tmpfs mount does not like the parameter substitution used for tmp_size

here is the relevant code
[ $VERBOSE ]  Lecho Generating /tmp  /var/log partitions ...
echo mount -t tmpfs tmpfs /tmp ${tmp_size:+-o size=$tmp_size}  
/linuxrc.err
qt mount -t tmpfs tmpfs /tmp ${tmp_size:+-o size=$tmp_size}
echo  mount -t tmpfs tmpfs /tmp -o size=$tmp_size  /linuxrc.err
qt mount -t tmpfs tmpfs /tmp -o size=$tmp_size

as you can see, the second mount appears to work, this is with tmp_size 
set to 20M in leaf.cfg

When not setting tmp_size in leaf.cfg the following results appear
mount -t tmpfs tmpfs /tmp
mount -t tmpfs tmpfs /tmp -o size=
Of course my debug code fails, but apparently the original code works
now this is the code which appears to work in both circumstances, it 
lacks the elegance of the substitution, but helas...

[ $VERBOSE ]  Lecho Generating /tmp  /var/log partitions ...
[ $tmp_size ]  qt mount -t tmpfs tmpfs /tmp -o size=$tmp_size
[ ! $tmp_size ]  qt mount -t tmpfs tmpfs /tmp
cheers
Erich




---
SF email is sponsored by - The IT Product Guide
Read honest  candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595alloc_id=14396op=click
___
leaf-devel mailing list
leaf-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/leaf-devel