Merge lp:~dpolehn-gmail/ubuntu/precise/pam/fix-110287 into lp:~ubuntu-core-dev/pam/ubuntu
Proposed by
Daniel Polehn
Status: | Work in progress |
---|---|
Proposed branch: | lp:~dpolehn-gmail/ubuntu/precise/pam/fix-110287 |
Merge into: | lp:~ubuntu-core-dev/pam/ubuntu |
Diff against target: |
29 lines (+9/-2) 2 files modified
debian/changelog (+6/-0) debian/libpam-modules.postinst (+3/-2) |
To merge this branch: | bzr merge lp:~dpolehn-gmail/ubuntu/precise/pam/fix-110287 |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Steve Langasek | Needs Fixing | ||
Review via email: mp+92599@code.launchpad.net |
To post a comment you must log in.
Unmerged revisions
- 887. By Daniel Polehn
-
Add /usr/local/games to default $PATH LP: #110287
+ DESIRED_ PATH='PATH= "/usr/local/ sbin:/usr/ local/bin: /usr/sbin: /usr/bin: /sbin:/ bin:/usr/ games:/ usr/local/ games"'
+ if ! grep -qs "$DESIRED_PATH" /etc/environment ; then
+ echo $DESIRED_PATH > /etc/environment
This will unconditionally add a new PATH line to /etc/environment unless that exact path is already present. A little bit more finessing is wanted here. We want to:
- add the PATH variable on new installs
- on upgrades from versions of the package earlier than 1.1.3-7ubuntu2, *insert* /usr/local/games into the path - don't clobber the path, because if the local admin has modified the path, we don't want to override that setting.
I think the command to use for inserting the added path would be something like:
sed -i -e'/^PATH / s,\(:/usr/ games\) ,:/usr/ local/games\ 1,' /etc/environment
And then the version number check needs to be fixed up as well, since currently the code only runs on new installs or when upgrading from a very, very ancient version of libpam-modules.