ispCP - Board - Support
changeset 2489 - Printable Version

+- ispCP - Board - Support (http://www.isp-control.net/forum)
+-- Forum: ispCP Omega Development Area (/forum-1.html)
+--- Forum: Tickets / Roadmap / Timeline (/forum-50.html)
+--- Thread: changeset 2489 (/thread-9035.html)



changeset 2489 - monotek - 01-01-2010 12:48 AM

I just saw that there was changes in file trunk/configs/ubuntu/init.d/ispcp_network.

There is a change of "#!/bin/bash" to "#!/bin/sh".

Imho thats no good idea because "/bin/sh" is not linked to "/bin/bash" in ubuntu. Its linked to /bin/dash.

I allready had problems with some bash scripts because "#!/bin/sh" and therefore /bin/dash was used.

Maybe other distros are affected too.


RE: changeset 2489 - TheCry - 01-01-2010 01:00 AM

Dash is very poor...
This is the first what i change if i install a new ubuntu server.
Use the following command to change dash to bash
Code:
ln -sf /bin/bash /bin/sh
Then all will work perfect!


RE: changeset 2489 - Nuxwin - 01-01-2010 02:30 AM

HI ;

(01-01-2010 12:48 AM)monotek Wrote:  I just saw that there was changes in file trunk/configs/ubuntu/init.d/ispcp_network.

There is a change of "#!/bin/bash" to "#!/bin/sh".

Imho thats no good idea because "/bin/sh" is not linked to "/bin/bash" in ubuntu. Its linked to /bin/dash.

I allready had problems with some bash scripts because "#!/bin/sh" and therefore /bin/dash was used.

Maybe other distros are affected too.

You take me for a fool? Big Grin

That's why I rewrote the init scripts according POSIX ! ! !

Test syntax with the new version:

Code:
nuxwin@dev:~$ ls /bin/sh -la
lrwxrwxrwx 1 root root 4 déc 31 17:46 /bin/sh -> dash

nuxwin@dev:~/Desktop/svn/trunk/configs/ubuntu/init.d$ ls -la /bin/dash
-rwxr-xr-x 1 root root 84084 aoû 26  2008 /bin/dash

nuxwin@dev:~/Desktop/svn/trunk/configs/ubuntu/init.d$ dash -n ispcp_network
nuxwin@dev:~/Desktop/svn/trunk/configs/ubuntu/init.d$

No error, so, it's ok. If you don't understand, read the related ticket before comment ! ! !

Also, thank you watched all the changes that were made. If you look closely, you'll see that I deleted the specific part to bash.

Code:
SERVICES=(
57                 # HTTP(S)
58                          80     443
59                 # POP3(S)
60                         110     995
61                 # IMAP4(S)
62                         143     993
63                 # SMTP(S)/SUBMIT
64                          25     465     587
65         )

replaced by
Code:
56    #
57    # HTTP(S): 80 443
58    # POP3(S): 110 995
59    # IMAP4(S)): 143 993
60    # MAIL(S): 25 465 587
61    SERVICES="80 443 110 143 25 465 587 995 993"

It's not for nothing !

See my comment here http://www.isp-control.net/ispcp/ticket/2132 and read that too https://wiki.ubuntu.com/DashAsBinSh

There is an explanation. The init script should not be written in bash because it is much slower than SH. This slows the boot process.

If you do not like dash, you'll be served as will be the default shell in Debian.

Cheers ;
(01-01-2010 01:00 AM)TheCry Wrote:  Dash is very poor...
This is the first what i change if i install a new ubuntu server.
Use the following command to change dash to bash
Code:
ln -sf /bin/bash /bin/sh
Then all will work perfect!

Sorry my friend, That is not good manner with debian based system. Use this command instead if you want really change the SHELL

Code:
$ sudo dpkg-reconfigure dash



RE: changeset 2489 - monotek - 01-01-2010 02:59 AM

Thanks for your kind words.

I just wanted to notice, that there CAN be problems when /bin/sh is linked to /bin/dash.

I never tested the script because i currently not run ispcp.

Nevertheless... Happy new years eve :-)


RE: changeset 2489 - Nuxwin - 01-01-2010 03:03 AM

(01-01-2010 02:59 AM)monotek Wrote:  Thanks for your kind words.

I just wanted to notice, that there CAN be problems when /bin/sh is linked to /bin/dash.

I never tested the script because i currently not run ispcp.

Nevertheless... Happy new years eve :-)

Sorry if I offended you. Simply, I'm tired of seeing people tell everything and anything, See people who say the same thing without taking the time to try to understand.

I have nothing against you, I'm just tired. Please accept my apology if I have hurt you. Wink


RE: changeset 2489 - joximu - 01-01-2010 03:26 AM

Hi monotek

I also saw the changes but I also saw the message nuxwin added to the changeset. Then it was clear.

Yes - we had alot of problems with dash being the default shell (starting with our makefiles etc etc). If we can use POSIX standard then I's also say: use the smallest/fastest shell available....
If this is usefull here (a productive server won't be started every day - but maybbe a developers server :-) is a different question :-)

/J


RE: changeset 2489 - monotek - 01-01-2010 04:03 AM

(01-01-2010 03:03 AM)nuxwin Wrote:  Sorry if I offended you. Simply, I'm tired of seeing people tell everything and anything, See people who say the same thing without taking the time to try to understand.

I have nothing against you, I'm just tired. Please accept my apology if I have hurt you. Wink

No problem :-)
I dont wanted to blame you too...

Im not that deep into all the development stuff right now, therefore i dont know that you allready know about the problems with /bin/dash.

I just look frequently to trac to have a quick overview of development status and try to help when i discover some things which could be a potential problem.

I hope i can give better feedback when i go to change my current controlpanal syscp to ispcp and have a better overview over all the things which happen here.

Thanks @ all ispcp developers :-)
Keep up the good work!