Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-09-08 Thread Thomas Bächler
Am 08.09.2010 06:07, schrieb Victor Lowther:
 Blame my ongoing Emacs education. I learned about
 (custom-set-variables '(indent-tabs-mode nil)) after doing most of the
 work, and dropped the whitespace cleanup patches due to size.
 
 Otherwise, I ignored the vim modelines -- 2 characters per indentation
 is not really enough, and most of the preexisting code happily ignored
 it anyways.

Yeah, the code was very inconsistent to begin with. And whitespace
cleanup patches are ugly, nobody bothered to do them so far.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-09-07 Thread Victor Lowther
On Tue, Sep 7, 2010 at 3:32 PM, Thomas Bächler tho...@archlinux.org wrote:
 Am 30.06.2010 23:47, schrieb Victor Lowther:
 Despite efforts to make the initscripts POSIX, we use bash 4.0 features.

 Bashifying this framework should result in about a 30% speedup, assuming no
 IO latency and that all programs we call also take zero time. :)

 I just pushed the patches - I was going to do more review of some of
 them, but I am apparently too busy. Please post any patches (especially
 if a correction of patch 21 is needed, I haven't finished reading the
 discussion) rebased on the current initscripts.git.

Your last patch has a typo (missed close paren):

diff --git a/rc.sysinit b/rc.sysinit
index b25f7ac..dc916a2 100755
--- a/rc.sysinit
+++ b/rc.sysinit
@@ -275,7 +275,7 @@ stat_busy Removing Leftover Files
 /bin/rm -f /var/lock/* /dev/null
 /bin/rm -rf /tmp/* /tmp/.* /dev/null
 /bin/rm -f /forcefsck /dev/null
-[[ -d /var/run ]]  /usr/bin/find /var/run/ \! -type d -delete  )
+[[ -d /var/run ]]  /usr/bin/find /var/run/ \! -type d -delete
 : | /var/run/utmp
 /bin/chmod 0664 /var/run/utmp
 # Keep {x,k,g}dm happy with xorg


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-09-07 Thread Dave Reisner
On Tue, Sep 07, 2010 at 09:51:59PM -0500, Victor Lowther wrote:
 On Tue, Sep 7, 2010 at 3:32 PM, Thomas Bächler tho...@archlinux.org wrote:
  Am 30.06.2010 23:47, schrieb Victor Lowther:
  Despite efforts to make the initscripts POSIX, we use bash 4.0 features.
 
  Bashifying this framework should result in about a 30% speedup, assuming no
  IO latency and that all programs we call also take zero time. :)
 
  I just pushed the patches - I was going to do more review of some of
  them, but I am apparently too busy. Please post any patches (especially
  if a correction of patch 21 is needed, I haven't finished reading the
  discussion) rebased on the current initscripts.git.
 
 Your last patch has a typo (missed close paren):
 
 -snip-

There's a typo in the network script from commit a334b36b:

diff --git a/network b/network
index 20ff9c7..5abb824 100755
--- a/network
+++ b/network
@@ -96,7 +96,7 @@ rtup()
 
 rtdown()
 {
-if [[ ! $1 ]; then
+if [[ ! $1 ]]; then
 echo usage: $0 rtdown route_name
 return 1
 fi



Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-09-07 Thread Dave Reisner
On Tue, Sep 07, 2010 at 10:32:28PM +0200, Thomas Bächler wrote:
 Am 30.06.2010 23:47, schrieb Victor Lowther:
  Despite efforts to make the initscripts POSIX, we use bash 4.0 features.
  
  Bashifying this framework should result in about a 30% speedup, assuming no
  IO latency and that all programs we call also take zero time. :)
 
 I just pushed the patches - I was going to do more review of some of
 them, but I am apparently too busy. Please post any patches (especially
 if a correction of patch 21 is needed, I haven't finished reading the
 discussion) rebased on the current initscripts.git.
 

I'm noticing that in general, the vim modelines aren't followed. Not
sure what editor was used to rebase these scripts, but the mix of tabs
and spaces for indents is somewhat irritating. I'm about to send a pair of
patches (neither of which address this) but which follow the modeline.

d


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-09-07 Thread Victor Lowther
On Tue, Sep 7, 2010 at 10:47 PM, Dave Reisner d...@falconindy.com wrote:
 On Tue, Sep 07, 2010 at 10:32:28PM +0200, Thomas Bächler wrote:
 Am 30.06.2010 23:47, schrieb Victor Lowther:
  Despite efforts to make the initscripts POSIX, we use bash 4.0 features.
 
  Bashifying this framework should result in about a 30% speedup, assuming no
  IO latency and that all programs we call also take zero time. :)

 I just pushed the patches - I was going to do more review of some of
 them, but I am apparently too busy. Please post any patches (especially
 if a correction of patch 21 is needed, I haven't finished reading the
 discussion) rebased on the current initscripts.git.


 I'm noticing that in general, the vim modelines aren't followed. Not
 sure what editor was used to rebase these scripts, but the mix of tabs
 and spaces for indents is somewhat irritating. I'm about to send a pair of
 patches (neither of which address this) but which follow the modeline.

Blame my ongoing Emacs education. I learned about
(custom-set-variables '(indent-tabs-mode nil)) after doing most of the
work, and dropped the whitespace cleanup patches due to size.

Otherwise, I ignored the vim modelines -- 2 characters per indentation
is not really enough, and most of the preexisting code happily ignored
it anyways.

 d



Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-08-01 Thread Victor Lowther
On Sat, Jul 31, 2010 at 11:54 AM, Thomas Bächler tho...@archlinux.org wrote:
 Am 31.07.2010 18:44, schrieb Victor Lowther:
 On Fri, Jul 23, 2010 at 5:51 PM, Thomas Bächler tho...@archlinux.org wrote:
 Am 23.07.2010 22:58, schrieb Victor Lowther:
 After looking over it again, you are correct -- split into array does
 not do The Right Thing here.  It will be easy to fix -- by the time
 you read this it will have been fixed and rebased back into
 bashification-redux.

 It is, thanks. I'll have to look at that in more detail when I am less
 tired. When that's done, I can release new initscripts so we can do
 lng testing.

 How goes the rest of the review?


 I only wanted to have a closer look at the cryptsetup patch before I
 pull this into master. But as you noticed, I didn't take the time to do
 so yet.

No problem.  Anything I can do to help?


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-31 Thread Victor Lowther
On Fri, Jul 23, 2010 at 5:51 PM, Thomas Bächler tho...@archlinux.org wrote:
 Am 23.07.2010 22:58, schrieb Victor Lowther:
 After looking over it again, you are correct -- split into array does
 not do The Right Thing here.  It will be easy to fix -- by the time
 you read this it will have been fixed and rebased back into
 bashification-redux.

 It is, thanks. I'll have to look at that in more detail when I am less
 tired. When that's done, I can release new initscripts so we can do
 lng testing.

How goes the rest of the review?


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-31 Thread Thomas Bächler
Am 31.07.2010 18:44, schrieb Victor Lowther:
 On Fri, Jul 23, 2010 at 5:51 PM, Thomas Bächler tho...@archlinux.org wrote:
 Am 23.07.2010 22:58, schrieb Victor Lowther:
 After looking over it again, you are correct -- split into array does
 not do The Right Thing here.  It will be easy to fix -- by the time
 you read this it will have been fixed and rebased back into
 bashification-redux.

 It is, thanks. I'll have to look at that in more detail when I am less
 tired. When that's done, I can release new initscripts so we can do
 lng testing.
 
 How goes the rest of the review?
 

I only wanted to have a closer look at the cryptsetup patch before I
pull this into master. But as you noticed, I didn't take the time to do
so yet.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-23 Thread Thomas Bächler
Am 17.07.2010 16:24, schrieb Victor Lowther:
 Sorry for taking so long. Apart from squashing the trivial
 bashifications, all patches I didn't comment on are ACKed.
 
 That is cool.  I went ahead and reworked/squashed everthing I considered
 a trivial bashification into 6 or 7 patches after taking into account
 the feedback from the ML.  The result is the bashification-redux branch
 @ git://fnordovax.org/~victor/arch-initscripts -- it is now 16 patches
 instead of 48, but the end result is exactly the same. I can post it to
 the ML if you like.

I looked over the new branch and found it much more readable. And
although some of the patches are not 100% clean yet (at least one
contains a trivial change that wasn't advertised in the commit), I like it.

Just a remark about the cryptsetup/crypttab rework (that one is scary,
and I didn't read it in details yet): The last column of crypttab can
contain space, meaning that everything past the fourth column will be
treated as one column (the options column). Did you take that into
account? I don't think so.

I know that crypttab is ugly and scary, and I was planning to replace it
with something sane, I just never got around to actually doing it.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-23 Thread Victor Lowther
On Fri, Jul 23, 2010 at 7:29 AM, Thomas Bächler tho...@archlinux.org wrote:
 Am 17.07.2010 16:24, schrieb Victor Lowther:
 Sorry for taking so long. Apart from squashing the trivial
 bashifications, all patches I didn't comment on are ACKed.

 That is cool.  I went ahead and reworked/squashed everthing I considered
 a trivial bashification into 6 or 7 patches after taking into account
 the feedback from the ML.  The result is the bashification-redux branch
 @ git://fnordovax.org/~victor/arch-initscripts -- it is now 16 patches
 instead of 48, but the end result is exactly the same. I can post it to
 the ML if you like.

 I looked over the new branch and found it much more readable. And
 although some of the patches are not 100% clean yet (at least one
 contains a trivial change that wasn't advertised in the commit), I like it.

 Just a remark about the cryptsetup/crypttab rework (that one is scary,
 and I didn't read it in details yet): The last column of crypttab can
 contain space, meaning that everything past the fourth column will be
 treated as one column (the options column). Did you take that into
 account? I don't think so.

After looking over it again, you are correct -- split into array does
not do The Right Thing here.  It will be easy to fix -- by the time
you read this it will have been fixed and rebased back into
bashification-redux.

 I know that crypttab is ugly and scary, and I was planning to replace it
 with something sane, I just never got around to actually doing it.


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-23 Thread Thomas Bächler
Am 23.07.2010 22:58, schrieb Victor Lowther:
 After looking over it again, you are correct -- split into array does
 not do The Right Thing here.  It will be easy to fix -- by the time
 you read this it will have been fixed and rebased back into
 bashification-redux.

It is, thanks. I'll have to look at that in more detail when I am less
tired. When that's done, I can release new initscripts so we can do
lng testing.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-11 Thread Victor Lowther
On Sun, Jul 11, 2010 at 4:45 AM, Thomas Bächler tho...@archlinux.org wrote:
 First of all: Sorry that I haven't finished the review, I have been busy
 with work and the heat kept me from thinking clearly.

 Am 07.07.2010 06:25, schrieb Dan McGee:
 On Tue, Jul 6, 2010 at 11:03 PM, Allan McRae al...@archlinux.org wrote:
 Here is a quick review on all these patches.   I recommend that the lvm and
 crypttab changes get a decent amount of testing before these go live as they
 are the biggest changes being done.

  Why has this been removed:
    -if [ -x /etc/rc.local.shutdown ]; then
    - /etc/rc.local.shutdown
    -fi
  Ah... it has been moved to another place in another commit.  Please
 document these sorts of changes in your commit message and preferably do the
 entire move in one commit.

 If there was one thing I wasn't so fond of in these patches, it seemed
 like there were too many. The beauty of git is the ability to go back
 and squash and split patches in a way that makes a lot more sense to
 others- it might not have been the way or order you did things in, but
 you should try as hard as possible to make a commit the largest
 logical unit that makes sense, but still small enough to grasp fully.

 If there are ever closely-related changes strewn across multiple
 patches in a patch set, you should probably think about merging those
 commits.

 I agree with Dan here. For example, all the commits that are merely
 replace [ with [[ and no functional changes should be one commit only.

Going back through and rewriting the patch series to do that will be
jsut about as much effort as creating the original one was.  If I had
know that was what your preference was, I would have written it that
way to begin with.  Since the end result is going to be the same once
the patch series is applied, though, I don't really see the point of
making modifications beyond bugfixes.

 I will release new initscripts and mkinitcpio now with a fix that needs
 to go to core before we do such a major change in initscripts.




Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-11 Thread Thomas Bächler
Am 11.07.2010 14:20, schrieb Victor Lowther:
 Going back through and rewriting the patch series to do that will be
 jsut about as much effort as creating the original one was.  If I had
 know that was what your preference was, I would have written it that
 way to begin with.  Since the end result is going to be the same once
 the patch series is applied, though, I don't really see the point of
 making modifications beyond bugfixes.

It is a matter of keeping the history readable. And it is simple: Just
create a new branch based on master, cherry-pick the commits that do
nothing but change [ to [[ and git merge --squash that branch into a new
one.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-11 Thread Caleb Cushing
On Sun, Jul 11, 2010 at 2:11 PM, Thomas Bächler tho...@archlinux.org wrote:
 No no, that wouldn't make sense. It should be this way: First all
 patches that actually change logic, then one big commit that just
 converts the _remaining_ [ to [[ with no additional logic changes involved.

wouldn't it be better to do the other way around... first the mass
conversions with no logic changes (more likely to be accepted?) then
the ones with logic changes in case some get rejected. that way the
mass conversion doesn't depend on logic changes by accident.


-- 
Caleb Cushing

http://xenoterracide.blogspot.com


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-11 Thread Victor Lowther
On Sun, Jul 11, 2010 at 1:11 PM, Thomas Bächler tho...@archlinux.org wrote:
 Am 11.07.2010 15:12, schrieb Victor Lowther:
 On Sun, 2010-07-11 at 14:26 +0200, Thomas Bächler wrote:
 Am 11.07.2010 14:20, schrieb Victor Lowther:
 Going back through and rewriting the patch series to do that will be
 jsut about as much effort as creating the original one was.  If I had
 know that was what your preference was, I would have written it that
 way to begin with.  Since the end result is going to be the same once
 the patch series is applied, though, I don't really see the point of
 making modifications beyond bugfixes.

 It is a matter of keeping the history readable. And it is simple: Just
 create a new branch based on master, cherry-pick the commits that do
 nothing but change [ to [[ and git merge --squash that branch into a new
 one.

 If that is all you wnat done, that is easy enough to do.  If you want
 all of the instances of trivial bashification split out from where I
 reworked the logic in the same patch, that is much less easy.

 No no, that wouldn't make sense. It should be this way: First all
 patches that actually change logic, then one big commit that just
 converts the _remaining_ [ to [[ with no additional logic changes involved.

OK, I flattened all the patches I considered trivial into several
large-ish patches, approx 1 or 2 per file in initscripts.  I did not
combine them all into one large patch because making all the logic
changes independent generated more conflicts than I felt like dealing
with.

The new branch is named bashification-redux, and is available at
git://fnordovax.org/~victor/arch-initscripts.  If you want me to post
them to the list again, I will, but the logic is unchanged.

 I hope to actually finish the review of the rest of the patches some
 time this week, sorry that I let so much time pass now.

No worries, the first time I did this sort of thing I ended up
maintaining the project. :)


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-07 Thread Victor Lowther
On Wed, 2010-07-07 at 14:03 +1000, Allan McRae wrote:
 Here is a quick review on all these patches.   I recommend that the lvm 
 and crypttab changes get a decent amount of testing before these go live 
 as they are the biggest changes being done.
 
 
 Tighten up the console size finding code a bit.
Add some white space in test construct:
  if ((STAT_COL==0)); then
  if (( STAT_COL == 0 )); then
and throughout these patches

Maybe when all the other bugs are fixed. :)

 Simplify the code that clears USECOLOR.
The following condition is removed with no commit message to explain why
  if [ $? = 3 ]; then
TERM_COLOURS=8

An exitval of 3 means tput has no idea what terminal type we are running
on, and I figured that it is after to default to not using colorized
output in that case.

 Replace trivial use of grep with bash regex conditional.
- if [ -n $CONSOLEMAP ]  echo $LOCALE | /bin/grep -qi utf ; then
+ [[ $CONSOLEMAP  $LOCALE =~ UTF|utf ]]  CONSOLEMAP=
 
Use ...  ${LOCALE,,} == utf ]] to accurately replicate the grep

Hmmm... I had not seen that parameter expansion before.  New to bash
4.1?

 Replace slightly too long echo staement with a here document.
^^ typo
I actually find the echo more readable

Well, then Thomas can keep it or drop it as he prefers. 

 Change the daemon runnign loop to use a case statement.
 Quote daemon names.
Merge these commits
 
 
 Both rc.single and rc.shutdown use the same code to kill everything.
  + # $1 = where we are being called from.
  + # This is used to determine which hooks to run.
-  Add separater line here...
  + # Find daemons NOT in the DAEMONS array. Shut these down first
 
Why has this been removed:
  -if [ -x /etc/rc.local.shutdown ]; then
  - /etc/rc.local.shutdown
  -fi
Ah... it has been moved to another place in another commit.  Please 
 document these sorts of changes in your commit message and preferably do 
 the entire move in one commit.

Will fix.

 Flatten LVM deactivation if block in rc.shutdown.
This change does not do the same thing and I do not see where it gets 
 replicated
  -if [ -f /etc/crypttab -a -n $(/bin/grep -v ^# /etc/crypttab | 
 /bin/grep -v ^$) ]; then
  +if [[ -f /etc/crypttab ]]; then

All the second bit of that test does is to see if there is actual
content in /etc/crypttab.  I handle that in the read loop by zapping
comments and blank lines with parameter expansion and conditional checks
instead -- the greps end up reading the whole file anyways.

Replicated via parameter expansion and conditionals:

[[ $line  ${line:0:1} != '#' ]] || continue
eval nspo=(${line%#*})

Also another:
+if [[ $USELVM =~ yes|YES
- ${USELVM,,} == yes
 
 
 bashify bringing up the loopback adaptor.
Add a commit message as that is doing a lot more than bashifing.

Already fixed in the last round of rebasing.

 Bashify locale setting.
$LOCALE =~ utf|UTF
 
 
 Allan

-- 
Victor Lowther
LPIC2 UCP RHCE 


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-07 Thread Victor Lowther

On Jul 6, 2010, at 11:25 PM, Dan McGee dpmc...@gmail.com wrote:

If there was one thing I wasn't so fond of in these patches, it seemed
like there were too many.


Some people like larger patches, some like smaller ones. It is easier  
to merge smaller ones together than it is to split larger ones apart.



The beauty of git is the ability to go back
and squash and split patches in a way that makes a lot more sense to
others- it might not have been the way or order you did things in, but
you should try as hard as possible to make a commit the largest
logical unit that makes sense, but still small enough to grasp fully.


Ya, I wanted to get feedback to see if the larger Arch community was  
interested before going too much farther.




If there are ever closely-related changes strewn across multiple
patches in a patch set, you should probably think about merging those
commits.

-Dan


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-06 Thread Allan McRae
Here is a quick review on all these patches.   I recommend that the lvm 
and crypttab changes get a decent amount of testing before these go live 
as they are the biggest changes being done.



Tighten up the console size finding code a bit.
  Add some white space in test construct:
if ((STAT_COL==0)); then
if (( STAT_COL == 0 )); then
  and throughout these patches


Simplify the code that clears USECOLOR.
  The following condition is removed with no commit message to explain why
if [ $? = 3 ]; then
  TERM_COLOURS=8


Replace trivial use of grep with bash regex conditional.
  - if [ -n $CONSOLEMAP ]  echo $LOCALE | /bin/grep -qi utf ; then
  + [[ $CONSOLEMAP  $LOCALE =~ UTF|utf ]]  CONSOLEMAP=

  Use ...  ${LOCALE,,} == utf ]] to accurately replicate the grep


Replace slightly too long echo staement with a here document.
  ^^ typo
  I actually find the echo more readable


Change the daemon runnign loop to use a case statement.
Quote daemon names.
  Merge these commits


Both rc.single and rc.shutdown use the same code to kill everything.
+ # $1 = where we are being called from.
+ # This is used to determine which hooks to run.
  -  Add separater line here...
+ # Find daemons NOT in the DAEMONS array. Shut these down first

  Why has this been removed:
-if [ -x /etc/rc.local.shutdown ]; then
- /etc/rc.local.shutdown
-fi
  Ah... it has been moved to another place in another commit.  Please 
document these sorts of changes in your commit message and preferably do 
the entire move in one commit.



Flatten LVM deactivation if block in rc.shutdown.
  This change does not do the same thing and I do not see where it gets 
replicated
-if [ -f /etc/crypttab -a -n $(/bin/grep -v ^# /etc/crypttab | 
/bin/grep -v ^$) ]; then

+if [[ -f /etc/crypttab ]]; then

  Also another:
  +if [[ $USELVM =~ yes|YES
  - ${USELVM,,} == yes


bashify bringing up the loopback adaptor.
  Add a commit message as that is doing a lot more than bashifing.


Bashify locale setting.
  $LOCALE =~ utf|UTF


Allan


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-06 Thread Dan McGee
On Tue, Jul 6, 2010 at 11:03 PM, Allan McRae al...@archlinux.org wrote:
 Here is a quick review on all these patches.   I recommend that the lvm and
 crypttab changes get a decent amount of testing before these go live as they
 are the biggest changes being done.

  Why has this been removed:
    -if [ -x /etc/rc.local.shutdown ]; then
    - /etc/rc.local.shutdown
    -fi
  Ah... it has been moved to another place in another commit.  Please
 document these sorts of changes in your commit message and preferably do the
 entire move in one commit.

If there was one thing I wasn't so fond of in these patches, it seemed
like there were too many. The beauty of git is the ability to go back
and squash and split patches in a way that makes a lot more sense to
others- it might not have been the way or order you did things in, but
you should try as hard as possible to make a commit the largest
logical unit that makes sense, but still small enough to grasp fully.

If there are ever closely-related changes strewn across multiple
patches in a patch set, you should probably think about merging those
commits.

-Dan


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-01 Thread Caleb Cushing
On Wed, Jun 30, 2010 at 6:07 PM, Victor Lowther
victor.lowt...@gmail.com wrote:
 I don't see the need for this patch. functions is not supposed to be
 executed standalone, it is only source'd from bash scripts.

 It is a habit I have -- including the shebang line at the top makes sure
 my text editors automatically detect the right shell syntax for syntax
 highlighting.

It has the added benefit of making it quite clear that the script will
not work on another POSIX shell.

-- 
Caleb Cushing

http://xenoterracide.blogspot.com


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-07-01 Thread Victor Lowther
On Thu, 2010-07-01 at 22:58 -0400, Caleb Cushing wrote:
 On Wed, Jun 30, 2010 at 6:07 PM, Victor Lowther
 victor.lowt...@gmail.com wrote:
  I don't see the need for this patch. functions is not supposed to be
  executed standalone, it is only source'd from bash scripts.
 
  It is a habit I have -- including the shebang line at the top makes sure
  my text editors automatically detect the right shell syntax for syntax
  highlighting.
 
 It has the added benefit of making it quite clear that the script will
 not work on another POSIX shell.

Indeed.

-- 
Victor Lowther
LPIC2 UCP RHCE 


[arch-general] [PATCH 01/48] Bashification of initscripts

2010-06-30 Thread Victor Lowther
Despite efforts to make the initscripts POSIX, we use bash 4.0 features.

Bashifying this framework should result in about a 30% speedup, assuming no
IO latency and that all programs we call also take zero time. :)
---
 functions |2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/functions b/functions
index 672eed2..023de35 100644
--- a/functions
+++ b/functions
@@ -1,4 +1,4 @@
-#
+#!/bin/bash
 # initscripts functions
 #
 
-- 
1.7.1



Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-06-30 Thread Thomas Bächler
Am 30.06.2010 23:47, schrieb Victor Lowther:
 Despite efforts to make the initscripts POSIX, we use bash 4.0 features.
 
 Bashifying this framework should result in about a 30% speedup, assuming no
 IO latency and that all programs we call also take zero time. :)
 ---
  functions |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)
 
 diff --git a/functions b/functions
 index 672eed2..023de35 100644
 --- a/functions
 +++ b/functions
 @@ -1,4 +1,4 @@
 -#
 +#!/bin/bash
  # initscripts functions

I don't see the need for this patch. functions is not supposed to be
executed standalone, it is only source'd from bash scripts.



signature.asc
Description: OpenPGP digital signature


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-06-30 Thread Victor Lowther
On Wed, 2010-06-30 at 23:55 +0200, Thomas Bächler wrote:
 Am 30.06.2010 23:47, schrieb Victor Lowther:
  Despite efforts to make the initscripts POSIX, we use bash 4.0 features.
  
  Bashifying this framework should result in about a 30% speedup, assuming no
  IO latency and that all programs we call also take zero time. :)
  ---
   functions |2 +-
   1 files changed, 1 insertions(+), 1 deletions(-)
  
  diff --git a/functions b/functions
  index 672eed2..023de35 100644
  --- a/functions
  +++ b/functions
  @@ -1,4 +1,4 @@
  -#
  +#!/bin/bash
   # initscripts functions
 
 I don't see the need for this patch. functions is not supposed to be
 executed standalone, it is only source'd from bash scripts.

It is a habit I have -- including the shebang line at the top makes sure
my text editors automatically detect the right shell syntax for syntax
highlighting.

-- 
Victor Lowther
LPIC2 UCP RHCE 


Re: [arch-general] [PATCH 01/48] Bashification of initscripts

2010-06-30 Thread Thomas Bächler
Am 01.07.2010 00:07, schrieb Victor Lowther:
 On Wed, 2010-06-30 at 23:55 +0200, Thomas Bächler wrote:
 Am 30.06.2010 23:47, schrieb Victor Lowther:
 Despite efforts to make the initscripts POSIX, we use bash 4.0 features.

 Bashifying this framework should result in about a 30% speedup, assuming no
 IO latency and that all programs we call also take zero time. :)
 ---
  functions |2 +-
  1 files changed, 1 insertions(+), 1 deletions(-)

 diff --git a/functions b/functions
 index 672eed2..023de35 100644
 --- a/functions
 +++ b/functions
 @@ -1,4 +1,4 @@
 -#
 +#!/bin/bash
  # initscripts functions

 I don't see the need for this patch. functions is not supposed to be
 executed standalone, it is only source'd from bash scripts.
 
 It is a habit I have -- including the shebang line at the top makes sure
 my text editors automatically detect the right shell syntax for syntax
 highlighting.
 

Fair enough, but then that should be in the commit message.



signature.asc
Description: OpenPGP digital signature