-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ncm-chkconfig: add chkconfig function to enable/disable services #1155
Conversation
i'm really fed up with the usual way of enabling services. |
05a4f37
to
479dc3c
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems a nice helper function which adds value.
Can you split the PAN cleanup into a separate commit please?
@{Enables (on + startstop=true) all arguments as services. | ||
If argument starts with a -, it is disabled (off + startstop=true). | ||
Use as e.g. | ||
"/software/components" = chkconfig("service1", "-service2"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is it necessary to escape the = ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pan bug quattor/pan#127
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😢
if (m[1] == '-') { | ||
what = 'off'; | ||
}; | ||
SELF['chkconfig']['service'][escape(m[2])] = dict(what, '', 'startstop', true); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you operate a level lower in the tree? This will cause an error if any part of /software/components is marked final since the compiler cannot tell that you are only modifying the chkconfig subtree.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i don't understand what you mean here. but if you want
"/software/components/chkconfig" = chkconfig(...);
we need a new function name. i don't like redundancy in names
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i opened quattor/pan#164
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I doubt the PAN bug is going to get fixed in time for 17.8 so how do we proceed? I can't think of a better name for the function than chkconfig()
As discussed at workshop, fixing quattor/pan#166 solves this in a better way so closing won't fix. |
No description provided.