[8649] in Athena Bugs
Re: rsaix 7.3R: check_dotfiles
daemon@ATHENA.MIT.EDU (Marc Horowitz)
Thu Nov 21 17:59:36 1991
To: Raul Acevedo <acevedo@Athena.MIT.EDU>
Cc: bugs@Athena.MIT.EDU
In-Reply-To: [8644] in bugs
Reply-To: Marc Horowitz <marc@MIT.EDU>
Date: Thu, 21 Nov 91 17:59:08 EST
From: Marc Horowitz <marc@Athena.MIT.EDU>
>> Apparently perl isn't fully installed on the rios.
Fixed. The installperl script doesn't always notice errors, so some
files weren't installed.
Speaking of check_dotfiles, here's a patch to fix some bugs in the
code.
Marc
*** /mit/consult/bin/check_dotfiles Wed Aug 28 08:30:07 1991
--- /tmp/cdf Thu Nov 21 17:48:19 1991
***************
*** 34,45 ****
foreach $file (@ARGV) {
$FD = &open_file($file);
while (<FD>) {
! &check_set_path if (/^\s*set\s?path\s*=/);
! &check_set_manpath if (/^\s*setenv\s?MANPATH\s?/);
! &check_set_xfiles if (/^\s*setenv\s?XFILESEARCHPATH\s?/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
! &check_set_path if (/^\s*set\s?path\s*=/);
&check_stty if (/^\s*stty\s/);
}
}
--- 34,45 ----
foreach $file (@ARGV) {
$FD = &open_file($file);
while (<FD>) {
! &check_set_path if (/^\s*set\s+path\s*=/);
! &check_set_manpath if (/^\s*setenv\s+MANPATH\s+/);
! &check_set_xfiles if (/^\s*setenv\s+XFILESEARCHPATH\s+/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
! &check_set_path if (/^\s*set\s+path\s*=/);
&check_stty if (/^\s*stty\s/);
}
}
***************
*** 99,105 ****
$FD = &open_file(".path");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s?path\s*=/);
&check_set_var if (/\$/);
}
&close_file;
--- 99,105 ----
$FD = &open_file(".path");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s+path\s*=/);
&check_set_var if (/\$/);
}
&close_file;
***************
*** 109,117 ****
$FD = &open_file(".environment");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s?path\s*=/);
! &check_set_manpath if (/^\s*setenv\s?MANPATH\s?/);
! &check_set_xfiles if (/^\s*setenv\s?XFILESEARCHPATH\s?/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
&check_stty if (/^\s*stty\s/);
--- 109,117 ----
$FD = &open_file(".environment");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s+path\s*=/);
! &check_set_manpath if (/^\s*setenv\s+MANPATH\s+/);
! &check_set_xfiles if (/^\s*setenv\s+XFILESEARCHPATH\s+/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
&check_stty if (/^\s*stty\s/);
***************
*** 123,131 ****
$FD = &open_file(".cshrc.mine");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s?path\s*=/);
! &check_set_prompt if (/^\s*set\s?prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s?XENVIRONMENT\s?/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
&check_stty if (/^\s*stty\s/);
--- 123,131 ----
$FD = &open_file(".cshrc.mine");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s+path\s*=/);
! &check_set_prompt if (/^\s*set\s+prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s+XENVIRONMENT\s+/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
&check_stty if (/^\s*stty\s/);
***************
*** 137,145 ****
$FD = &open_file(".tcshrc");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s?path\s*=/);
! &check_set_prompt if (/^\s*set\s?prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s?XENVIRONMENT\s?/);
&check_path_use if (/\//);
&check_stty if (/^\s*stty\s/);
}
--- 137,145 ----
$FD = &open_file(".tcshrc");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s+path\s*=/);
! &check_set_prompt if (/^\s*set\s+prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s+XENVIRONMENT\s+/);
&check_path_use if (/\//);
&check_stty if (/^\s*stty\s/);
}
***************
*** 150,158 ****
$FD = &open_file(".startup.X");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s?path\s*=/);
! &check_set_prompt if (/^\s*set\s?prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s?XENVIRONMENT\s?/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
&check_stty if (/^\s*stty\s/);
--- 150,158 ----
$FD = &open_file(".startup.X");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s+path\s*=/);
! &check_set_prompt if (/^\s*set\s+prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s+XENVIRONMENT\s+/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
&check_stty if (/^\s*stty\s/);
***************
*** 164,171 ****
$FD = &open_file(".startup.tty");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s?path\s*=/);
! &check_set_prompt if (/^\s*set\s?prompt\s*=/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
&check_stty if (/^\s*stty\s/);
--- 164,171 ----
$FD = &open_file(".startup.tty");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s+path\s*=/);
! &check_set_prompt if (/^\s*set\s+prompt\s*=/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
&check_stty if (/^\s*stty\s/);
***************
*** 177,185 ****
$FD = &open_file(".xsession");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s?path\s*=/);
! &check_set_prompt if (/^\s*set\s?prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s?XENVIRONMENT\s?/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
&check_stty if (/^\s*stty\s/);
--- 177,185 ----
$FD = &open_file(".xsession");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s+path\s*=/);
! &check_set_prompt if (/^\s*set\s+prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s+XENVIRONMENT\s+/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
&check_stty if (/^\s*stty\s/);
***************
*** 191,199 ****
$FD = &open_file(".login.mine");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s?path\s*=/);
! &check_set_prompt if (/^\s*set\s?prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s?XENVIRONMENT\s?/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
&check_stty if (/^\s*stty\s/);
--- 191,199 ----
$FD = &open_file(".login.mine");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s+path\s*=/);
! &check_set_prompt if (/^\s*set\s+prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s+XENVIRONMENT\s+/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
&check_stty if (/^\s*stty\s/);
***************
*** 205,213 ****
$FD = &open_file(".logout");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s?path\s*=/);
! &check_set_prompt if (/^\s*set\s?prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s?XENVIRONMENT\s?/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
}
--- 205,213 ----
$FD = &open_file(".logout");
return if ($FD == 0);
while (<FD>) {
! &check_set_path if (/^\s*set\s+path\s*=/);
! &check_set_prompt if (/^\s*set\s+prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s+XENVIRONMENT\s+/);
&check_path_use if (/\//);
&check_set_var if (/\$/);
}
***************
*** 272,280 ****
print " Your .cshrc looks like it may be non-standard. Any modifications\n";
print " to this file are not supported, and may break in future releases.\n\n";
while (<FD>) {
! &check_set_path if (/^\s*set\s?path\s*=/);
! &check_set_prompt if (/^\s*set\s?prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s?XENVIRONMENT\s?/);
&check_path_use if (/\//);
&check_stty if (/^\s*stty\s/);
}
--- 272,280 ----
print " Your .cshrc looks like it may be non-standard. Any modifications\n";
print " to this file are not supported, and may break in future releases.\n\n";
while (<FD>) {
! &check_set_path if (/^\s*set\s+path\s*=/);
! &check_set_prompt if (/^\s*set\s+prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s+XENVIRONMENT\s+/);
&check_path_use if (/\//);
&check_stty if (/^\s*stty\s/);
}
***************
*** 293,301 ****
print " to this file are not supported, and may break in future releases.\n\n";
}
while (<FD>) {
! &check_set_path if (/^\s*set\s?path\s*=/);
! &check_set_prompt if (/^\s*set\s?prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s?XENVIRONMENT\s?/);
&check_path_use if (/\//);
&check_stty if (/^\s*stty\s/);
}
--- 293,301 ----
print " to this file are not supported, and may break in future releases.\n\n";
}
while (<FD>) {
! &check_set_path if (/^\s*set\s+path\s*=/);
! &check_set_prompt if (/^\s*set\s+prompt\s*=/);
! &check_set_xfiles if (/^\s*setenv\s+XENVIRONMENT\s+/);
&check_path_use if (/\//);
&check_stty if (/^\s*stty\s/);
}
***************
*** 384,390 ****
$path =~ s/\s*\\\s*//g;
! if (! ((/\/usr\/lib\/X11/) && (/\/usr\/athena\/lib\/X11/))) {
print "line $lineno:\n";
print " setting XFILESEARCHPATH fails to include\n";
print " /usr/athena/lib/X11 and /usr/lib/X11\n\n";
--- 384,391 ----
$path =~ s/\s*\\\s*//g;
! if (! (($path =~ /\/usr\/lib\/X11/) &&
! ($path =~ /\/usr\/athena\/lib\/X11/))) {
print "line $lineno:\n";
print " setting XFILESEARCHPATH fails to include\n";
print " /usr/athena/lib/X11 and /usr/lib/X11\n\n";