Current time: 11-28-2024, 08:34 AM Hello There, Guest! (LoginRegister)


Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
changeset 2489
Author Message
Nuxwin
Unregistered

 
Post: #3
RE: changeset 2489
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
01-01-2010 02:30 AM
Quote this message in a reply
Post Reply 


Messages In This Thread
changeset 2489 - monotek - 01-01-2010, 12:48 AM
RE: changeset 2489 - TheCry - 01-01-2010, 01:00 AM
RE: changeset 2489 - Nuxwin - 01-01-2010 02:30 AM
RE: changeset 2489 - monotek - 01-01-2010, 02:59 AM
RE: changeset 2489 - Nuxwin - 01-01-2010, 03:03 AM
RE: changeset 2489 - monotek - 01-01-2010, 04:03 AM
RE: changeset 2489 - joximu - 01-01-2010, 03:26 AM

Forum Jump:


User(s) browsing this thread: 1 Guest(s)