Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 278383 Details for
Bug 371141
sys-apps/openrc: $IFS misuse in unmount-related initscripts (mount-ro and localmount)
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Old and new ways of setting/unsetting IFS to OIFS
testifs.sh (text/plain), 1.09 KB, created by
Anthony Basile
on 2011-06-27 19:47:23 UTC
(
hide
)
Description:
Old and new ways of setting/unsetting IFS to OIFS
Filename:
MIME Type:
Creator:
Anthony Basile
Created:
2011-06-27 19:47:23 UTC
Size:
1.09 KB
patch
obsolete
>#!/bin/bash > >old-way() { > local OX=$X SX=${X-y} X=$X > > X="blah" > > if [ "$SX" = y ]; then > X=$OX > else > unset X > fi >} > > >new-way() { > local OX=$X SX=${X-n} > > X="blah" > > if [ "$SX" = n ]; then > unset X > else > X=$OX > fi >} > > >baseline() { > X="blah" >} > > >echo "X unset - using old way" >unset X >old-way >ANSWER=${X+"X is set"} >[[ -z ${ANSWER} ]] && echo "X is not set" || echo "X is set to $X" > >echo >echo > >echo "X set - using old way" >X="A" >old-way >ANSWER=${X+"X is set"} >[[ -z ${ANSWER} ]] && echo "X is not set" || echo "X is set to $X" > >echo >echo > >echo "X unset - using new way" >unset X >new-way >ANSWER=${X+"X is set"} >[[ -z ${ANSWER} ]] && echo "X is not set" || echo "X is set to $X" > >echo >echo > >echo "X set - using new way" >X="A" >new-way >ANSWER=${X+"X is set"} >[[ -z ${ANSWER} ]] && echo "X is not set" || echo "X is set to $X" > >echo >echo > >echo "X unset - baseline" >unset X >baseline >ANSWER=${X+"X is set"} >[[ -z ${ANSWER} ]] && echo "X is not set" || echo "X is set to $X" > >echo >echo > >echo "X set - baseline" >X="A" >baseline >ANSWER=${X+"X is set"} >[[ -z ${ANSWER} ]] && echo "X is not set" || echo "X is set to $X" >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 371141
:
276649
| 278383 |
278391
|
279343