[26497] in Source-Commits
Re: /svn/athena r25590 - in trunk/debathena/debathena/dotfiles: . debian
daemon@ATHENA.MIT.EDU (Jonathan Reed)
Fri Jun 29 18:25:10 2012
Mime-Version: 1.0 (Apple Message framework v1084)
Content-Type: text/plain; charset=us-ascii
From: Jonathan Reed <jdreed@MIT.EDU>
In-Reply-To: <alpine.GSO.1.10.1206291802190.18441@multics.mit.edu>
Date: Fri, 29 Jun 2012 18:25:08 -0400
Cc: source-commits@MIT.EDU
Message-Id: <AA57262C-0949-4BDF-8B54-56F6D468E3A9@MIT.EDU>
To: Benjamin Kaduk <kaduk@MIT.EDU>
Content-Transfer-Encoding: 8bit
> It seems a little odd to use "we", here, instead of "It has been automatically unset for you".
Yes, Lintian doesn't like it either.
>
>> + echo "If you really did want that, set skip_sanity_checks=y in your .bashrc.mine." >&2
>> + [ -n "$DISPLAY" ] && /usr/bin/zenity --warning --text="You tried to set LD_ASSUME_KERNEL in your shell customizations. Don't do that.\nWe have unset it for you.\nSet skip_sanity_checks=y in your ~/.bashrc.mine if you really want that."
>
> Also, you might reuse the $text trick from the PATH check above, here.
Fair enough.
>
> Does variable assignment change $? ?
$?foo is "is foo set". That's the same syntax for all the skip_foo variables. We tell people a variety of things, and in fact if you did set skip_sanity_checks=no-never-skip-them, this would trigger that code. "Don't do that.", but I can add the extra code and/or clean up the
> The style would probably be better to move "missing=0" up one line, regardless.
Sure.
> When maintaining scripts with the same functionality in different languages (shells), it's probably better for one's sanity to keep the structure as parallel as possible, e.g., use this grep construct in the sh script as well.
Fair enough.
>
>> + if ( $? != 0 ) then
>> + missing=1
>> + endif
>> + if ( $missing == 1 ) then
>> + text="You appear to have incorrectly modified your PATH variable in your dotiles,\nand as such have deleted /bin and/or /usr/bin from your PATH, which\nwill likely cause this login session to fail. Please correct this problem."
>> + echo "$text" > /dev/stderr
>> + if ( $?DISPLAY) then
>> + /usr/bin/zenity --warning --text="$text"
>> + endif
>> + endif
>> + if ( $?LD_ASSUME_KERNEL ) then
>> + unsetenv LD_ASSUME_KERNEL
>> + echo "Setting LD_ASSUME_KERNEL in your dotfiles is a bad idea." > /dev/stderr
>> + echo "We have unset it for you. Set skip_sanity_checks=y if you really wanted it." > /dev/stderr
>> + if ( $?DISPLAY) then
>> + /usr/bin/zenity --warning --text="You set LD_ASSUME_KERNEL in your dotfiles which is a bad idea.\nWe have unset it for you.\nSet skip_sanity_checks=y if you really wanted it."
>
> The same comments from the sh script apply here.
>
> But, it should work...
> -Ben
>
>> + endif
>> + endif
>> +endif
>>
>> Modified: trunk/debathena/debathena/dotfiles/debian/changelog
>> ===================================================================
>> --- trunk/debathena/debathena/dotfiles/debian/changelog 2012-06-29 16:50:48 UTC (rev 25589)
>> +++ trunk/debathena/debathena/dotfiles/debian/changelog 2012-06-29 18:45:34 UTC (rev 25590)
>> @@ -1,3 +1,10 @@
>> +debathena-dotfiles (10.0.30-0debathena2) unstable; urgency=low
>> +
>> + * Prevent users from shooting themselves in the foot with PATH or
>> + LD_ASSUME_KERNEL
>> +
>> + -- Jonathan Reed <jdreed@mit.edu> Fri, 29 Jun 2012 14:45:43 -0400
>> +
>> debathena-dotfiles (10.0.30-0debathena1) unstable; urgency=low
>>
>> * Update logout alias for GNOME 3.0 (Trac: #1027)
>>
>>