Bonus it manipulates less /etc/shell only adding a line if needed
Details
- Reviewers
manu mat - Group Reviewers
portmgr - Commits
- rP552938: Convert @shell from shell script to lua script
Diff Detail
- Repository
- rP FreeBSD ports repository
- Lint
No Lint Coverage - Unit
No Test Coverage - Build Status
Buildable 34183 Build 31336: arc lint + arc unit
Event Timeline
Keywords/shell.ucl | ||
---|---|---|
35 | Why == in the post-install and ~= here? |
Keywords/shell.ucl | ||
---|---|---|
35 | This one is rewriting all the lines that arent' the shell_path, the other one is bailing out as soon as we find shell_path |
Keywords/shell.ucl | ||
---|---|---|
35 | Mmmm, I fail to see where this answers my question. |
Keywords/shell.ucl | ||
---|---|---|
35 | So on deinstall we bufferize the content of /etc/shells for all lines except the one we want to possibility remove. If the shell we are interested in is found we overwrite /etc/shells if not we just drop the buffer ;) on install this is this opposite we append our new shell only if we haven't already found it in existing /etc/shells |
Keywords/shell.ucl | ||
---|---|---|
35 | No, I get your point about what post-install and pre-deinstall do, I did the first time around. |
Keywords/shell.ucl | ||
---|---|---|
35 | Maybe I was not clear enough, doing if <not> ( sonething ) is ok, but doing if <not> (something) else (something else) is an anti-pattern, if there is an else, the test must be a positive thing and the clauses switched, otherwise it gets hard on the brain. |
Keywords/shell.ucl | ||
---|---|---|
35 | Right ok, now I understand what you mean makes sense, let me fix that ;) |