diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-12-05 18:51:17 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-12-05 18:51:17 -0400 |
| commit | 4fe1dcb6142d4033482d6f25b916b64926bc7b3f (patch) | |
| tree | fd8597ccbb3c591e118da4edaa8da650f075f3bf /doc/todo | |
| parent | 97a224b194b96184c7938de0bb1e1f423612ccbc (diff) | |
| parent | 5cfb20668421acb3c0de133afe973fc693b8b320 (diff) | |
Merge branch 'joeyconfig'
Diffstat (limited to 'doc/todo')
| -rw-r--r-- | doc/todo/Wishlist:_User.hasLoginShell/comment_1_c02e8783b91c3c0326bf1b317be4694f._comment | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/doc/todo/Wishlist:_User.hasLoginShell/comment_1_c02e8783b91c3c0326bf1b317be4694f._comment b/doc/todo/Wishlist:_User.hasLoginShell/comment_1_c02e8783b91c3c0326bf1b317be4694f._comment index 52043406..91ca404e 100644 --- a/doc/todo/Wishlist:_User.hasLoginShell/comment_1_c02e8783b91c3c0326bf1b317be4694f._comment +++ b/doc/todo/Wishlist:_User.hasLoginShell/comment_1_c02e8783b91c3c0326bf1b317be4694f._comment @@ -25,17 +25,16 @@ run: shellSetTo :: UserName -> FilePath -> Property shellSetTo user shell = cmdProperty "chsh" ["--shell", shell, user] - +: The only remaining problem with this is that shellSetTo runs chsh every time, and propellor will always display that it's made a change each time it runs, even when it didn't really do much. Now, there's an easy way to -avoid that problem, we could just tell propellor that it's a trivial -property, and then it will run chsh every time and not think it made any -change: +avoid that problem, we could just tell propellor to assume it's not made +any change: shellSetTo :: UserName -> FilePath -> Property - shellSetTo user shell = trivial $ - cmdProperty "chsh" ["--shell", shell, user] + shellSetTo user shell = cmdProperty "chsh" ["--shell", shell, user] + `assume` NoChange But, it's not much harder to do this right. Let's make the property check if the user's shell is already set to the desired value and avoid |
