openssh: fix tab/spacing in init script
PATCH 1/1 openssh: fix tab/spacing in init script
Several of the lines in S50sshd script have a strange mix of spaces and tabs, that at least do not look consistent with neighboring lines. This patch makes the spacing consistent, and also strips the trailing spaces.
--- package/openssh/S50sshd | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
package/openssh/S50sshd +10 -10
@@ -23,7 +23,7 @@ if [ ! -f /etc/ssh_host_dsa_key ] ; then echo Generating DSA Key... echo THIS CAN TAKE A MINUTE OR TWO DEPENDING ON YOUR PROCESSOR! echo - /usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key -C '' -N '' + /usr/bin/ssh-keygen -t dsa -f /etc/ssh_host_dsa_key -C '' -N '' fi # Check for the SSH2 ECDSA key
@@ -33,35 +33,35 @@ if [ ! -f /etc/ssh_host_ecdsa_key ]; then echo /usr/bin/ssh-keygen -t ecdsa -f /etc/ssh_host_ecdsa_key -C '' -N '' fi - + umask 077 start() { - echo -n "Starting sshd: " + echo -n "Starting sshd: " /usr/sbin/sshd touch /var/lock/sshd echo "OK" -} +} stop() { echo -n "Stopping sshd: " - killall sshd + killall sshd rm -f /var/lock/sshd - echo "OK" + echo "OK" } restart() { stop start -} +} case "$1" in start) - start + start ;; stop) - stop + stop ;; restart|reload) - restart + restart ;; *) echo "Usage: $0 {start|stop|restart}"
Signature · 1 line
1.7.9.5
PATCH 1/1 openssh: fix tab/spacing in init script
Hi Danomi,
Op 21-aug.-2013 03:11 schreef "Danomi Manchego" <[email protected]> het volgende:
Quoted 8 lines
Several of the lines in S50sshd script have a strange mix of spaces and tabs, that at least do not look consistent with neighboring lines. This patch makes the spacing consistent, and also strips the trailing spaces.
Signed-off-by Danomi Manchego <[email protected]>---
I haven't checked if there are such problems, but have you considered checking all init scripts for the same type of problems and fixing them in this same patch?
A rough way of finding these scripts is:
find -name "S*"
Thanks,
Thomas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130821/dd0323a0/attachment.html>
A message that is not in the archive (sent off-list or not yet received): CAAXf6LUO9M-Nghy8ZVMS7L0y2J+=3G6kw1eJKnMUhWOt9wGg4Q@mail.gmail.com
PATCH 1/1 openssh: fix tab/spacing in init script
Quoted 4 lines · Thomas De Schampheleire
I haven't checked if there are such problems, but have you considered checking all init scripts for the same type of problems and fixing them in this same patch?
Thomas,
I looked through the other init scripts. There's some variation, mostly in:
* Tabs vs spacing.
* Where spaces are used instead of tabs, sometimes two spaces are used per level, other times four.
* Indentation of start/stop under the case "$1" / esac clause.
* Some of the start/stop begin in the first column, aligned with 'case'.
* Some of them have two spaces, followed by actions offset with a tabs.
* Some of them have two spaces, followed by actions offset with a
sapces.
* Some are offset with tab, followed by actions offset with two tabs.
So I took the approach of leaving that part alone, and just fixing the lines that were offset by a mix of spaces and tabs, since that seemed clearly bad.
I'd be willing to go through all of them and make them uniform, if recommended guidelines can be stated with regards to the above variations.
Tabs are tempting only because it's a single character in text files that
go in the target - otherwise, I'm normally in the tabs-are-evil camp, since thing which start out with tabs tend get modified with spaces over time, and because editor rendering of tab width can vary. So I'd be willing to go either way.
Danomi -
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20130821/374eb0f9/attachment.html>
PATCH 1/1 openssh: fix tab/spacing in init script
Hi Danomi,
Quoted 25 lines · Danomi Manchego
Quoted 4 lines · Thomas De Schampheleire
I haven't checked if there are such problems, but have you considered checking all init scripts for the same type of problems and fixing them in this same patch?
Thomas,
I looked through the other init scripts. There's some variation, mostly in:
* Tabs vs spacing.
* Where spaces are used instead of tabs, sometimes two spaces are used per level, other times four.
* Indentation of start/stop under the case "$1" / esac clause.
* Some of the start/stop begin in the first column, aligned with 'case'.
* Some of them have two spaces, followed by actions offset with a tabs.
* Some of them have two spaces, followed by actions offset with a
sapces.
* Some are offset with tab, followed by actions offset with two tabs.So I took the approach of leaving that part alone, and just fixing the lines that were offset by a mix of spaces and tabs, since that seemed clearly bad.
Quoted 7 lines
I'd be willing to go through all of them and make them uniform, if recommended guidelines can be stated with regards to the above variations. Tabs are tempting only because it's a single character in text files that go in the target - otherwise, I'm normally in the tabs-are-evil camp, since thing which start out with tabs tend get modified with spaces over time, and because editor rendering of tab width can vary. So I'd be willing to go either way.
Thanks for checking. Seems there was more variance than I expected.
I'm not sure what to do here. Unless such init scripts have been copied from elsewhere (in which making cosmetic changes may be undesirable), I'm ok with having them changed according to a given guideline.
Before trying to establish such a guideline, what does the community think about this?
If there is no consensus in changing, then no need for a guideline.
Thanks,
Thomas
PATCH 1/1 openssh: fix tab/spacing in init script
Quoted 7 lines · Thomas De Schampheleire
Quoted 7 lines
Quoted 7 lines
I'd be willing to go through all of them and make them uniform, if recommended guidelines can be stated with regards to the above variations. Tabs are tempting only because it's a single character in text files that go in the target - otherwise, I'm normally in the tabs-are-evil camp, since thing which start out with tabs tend get modified with spaces over time, and because editor rendering of tab width can vary. So I'd be willing to go either way.
Quoted 6 lines
Thanks for checking. Seems there was more variance than I expected.
I'm not sure what to do here. Unless such init scripts have been copied from elsewhere (in which making cosmetic changes may be undesirable), I'm ok with having them changed according to a given guideline.
If it is copied from elsewhere then it probably shouldn't be in
buildroot, but just copied from elsewhere.
Quoted 3 lines
Before trying to establish such a guideline, what does the community think about this?
If there is no consensus in changing, then no need for a guideline.
I guess that's a judgement call for Peter to make.
Note that we also have this kind of whitespace inconsistencies in e.g.
support/scripts.
Regards,
Arnout
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7CB5 E4CC 6C2E EFD4 6E3D A754 F963 ECAB 2450 2F1F
PATCH 1/1 openssh: fix tab/spacing in init script
In reply to Danomi ManchegoQuoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Danomi" == Danomi Manchego <[email protected]> writes:
Danomi> Several of the lines in S50sshd script have a strange mix of spaces Danomi> and tabs, that at least do not look consistent with neighboring lines. Danomi> This patch makes the spacing consistent, and also strips the trailing Danomi> spaces.
Danomi> Signed-off-by: Danomi Manchego <[email protected]>
Committed, thanks.
Signature · 1 line
Bye, Peter Korsgaard