Bug 796663 - RFE: add support for "service iptables save" and other non-standard actions
Summary: RFE: add support for "service iptables save" and other non-standard actions
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: initscripts
Version: rawhide
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Lukáš Nykrýn
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: 748134 816135
TreeView+ depends on / blocked
 
Reported: 2012-02-23 12:26 UTC by Michal Schmidt
Modified: 2014-09-05 18:51 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-05 18:51:47 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michal Schmidt 2012-02-23 12:26:02 UTC
I got this idea when discussing FESCo ticket 806:
https://fedorahosted.org/fesco/ticket/806

Some FESCo members feel that "service iptables save" and similar non-standard initscript actions ought to remain supported because of the long tradition and the amount of existing documentation.
Though it is technically possible today to keep the non-standard actions working, it would require the packages to keep shipping a script in /etc/rc.d/init.d, which is:
 - confusing when there's already a native systemd unit
 - against the currently accepted packaging guidelines
 - somewhat likely to uncover bugs in the coexistence of both a SysV initscript
   and a native systemd unit for the same thing.

My proposal is for /sbin/service to gain explicit support for non-standard actions. It could look like this for example:
initscript would provide a directory /usr/lib/initscripts/legacy-actions/.
The iptables package would ship two executable scripts implementing one non-standard action each:
/usr/lib/initscripts/legacy-actions/iptables/save
/usr/lib/initscripts/legacy-actions/iptables/panic

When the user runs "service iptables save", /sbin/service would locate the former script and run it.
(The scripts should print a message telling the user that they're using a legacy command and what the newly preferred command is. Then they would proceed with the useful action itself.)

Separating the actions into distinct script should make this layout friendly to programmable bash-completion.

Comment 1 Bill Nottingham 2012-02-23 20:14:18 UTC
I'm not sure I really like this, given that the entire point of the bits in /sbin/service was to transparently redirect to the old script for unhandled actions.

Comment 2 Michal Schmidt 2012-02-27 16:28:17 UTC
I'd like to avoid shipping files under /etc/init.d in perpetuity.
If we decide that the files can stay there for a limited number of releases only as a transition period, I'm fine with it.

But if "service iptables save" and similar commands should remain supported perpetually, then I'd really prefer moving the implementations somewhere else.

Comment 5 Michal Schmidt 2012-06-14 14:56:49 UTC
Proposed patch:
https://fedorahosted.org/pipermail/initscripts-devel/2012-June/000082.html

Comment 6 Bill Nottingham 2012-06-26 20:05:16 UTC
Added.

Comment 7 Bill Nottingham 2012-06-26 20:11:18 UTC
(with slight modifications - s|/usr/lib|/usr/libexec|)

Comment 8 Fedora Admin XMLRPC Client 2013-09-04 14:51:08 UTC
This package has changed ownership in the Fedora Package Database.  Reassigning to the new owner of this component.

Comment 9 Michal Schmidt 2014-09-05 18:51:47 UTC
This got implemented a long time ago.


Note You need to log in before you can comment on or make changes to this bug.