Merge lp://staging/~dpolehn-gmail/ubuntu/precise/pam/fix-110287 into lp://staging/~ubuntu-core-dev/pam/ubuntu

Proposed by Daniel Polehn
Status: Work in progress
Proposed branch: lp://staging/~dpolehn-gmail/ubuntu/precise/pam/fix-110287
Merge into: lp://staging/~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://staging/~dpolehn-gmail/ubuntu/precise/pam/fix-110287
Reviewer Review Type Date Requested Status
Steve Langasek Needs Fixing
Review via email: mp+92599@code.staging.launchpad.net
To post a comment you must log in.
Revision history for this message
Steve Langasek (vorlon) wrote :

+ 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.

review: Needs Fixing

Unmerged revisions

887. By Daniel Polehn

Add /usr/local/games to default $PATH LP: #110287

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches