FS#19551 - [initscripts] initscripts should be dash compatible

Attached to Project: Arch Linux
Opened by Andres P (llanero) - Friday, 21 May 2010, 02:59 GMT
Last edited by Thomas Bächler (brain0) - Wednesday, 09 June 2010, 17:41 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To No-one
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 2
Private No

Details

Description:

bash(1) is slow and prone to breaking.

Additional info:
* package version: git

The attached patch does not make the scripts POSIX compatible, since local and test -e, among other things, are undefined by POSIX.

However, dash(1) does support these.
This task depends upon

Closed by  Thomas Bächler (brain0)
Wednesday, 09 June 2010, 17:41 GMT
Reason for closing:  Won't implement
Additional comments about closing:  We are using bash arrays and lots of other bash features, removing them now is simply impossible. bash it is, and will be.
Comment by Andres P (llanero) - Friday, 21 May 2010, 10:27 GMT
Missed a bash-only &>/dev/null redirection
Comment by Jan de Groot (JGC) - Friday, 21 May 2010, 22:06 GMT
Note that initscripts source /etc/rc.conf, some of the variables in there use bash arrays. Examples of these are MODULES, INTERFACES, ROUTES, NETWORKS and DAEMONS. They can be rewritten, but there's no way this will ever get converted on end-user systems.
Comment by Andres P (llanero) - Friday, 21 May 2010, 23:21 GMT
> Note that initscripts source /etc/rc.conf, some of the variables in
> there use bash arrays. Examples of these are MODULES, INTERFACES,
> ROUTES, NETWORKS and DAEMONS. They can be rewritten, but there's no
> way this will ever get converted on end-user systems.

True. I've made rc.conf not use arrays in the patch, but it still
depends on the user.

Although realistically all they need to do is usually s,[()],",g

If they are using netcfg, then that's another patch forthcoming.
Comment by Dan McGee (toofishes) - Tuesday, 25 May 2010, 14:46 GMT
This is not going to happen unfortunately; we've had this discussion in the past and rc.conf is just too central to things to change. Nor is bash all that slow *if* it is not being forked continuously. I will agree that it has the potential to break being linked to as many libraries as it is, however.
Comment by Andres P (llanero) - Tuesday, 25 May 2010, 15:07 GMT
Even though dropping array support won't be pulled by you guys, would there be a possibility of accepting a patch were the only non-dash compatible feature is arrays?

I say this because that's about the only real bash feature in use; the rest of the changes in the patch are very superficial. That way, people using another shell can more easily merge rc.* when it's time to upgrade.

Loading...