File:  [LON-CAPA] / doc / loncapafiles / bash_config_check.piml
Revision 1.3: download - view: text, annotated - select for diffs
Wed Jul 10 17:39:58 2024 UTC (4 months, 3 weeks ago) by raeburn
Branches: MAIN
CVS tags: HEAD
- Move redirect of STDERR to STDOUT so it is next to the bind command.

<!DOCTYPE piml PUBLIC "-//TUX/DTD piml 1.0 Final//EN" 
	"http://lpml.sourceforge.net/DTD/piml.dtd">
<!-- bash_config_check.piml -->

<!-- $Id: bash_config_check.piml,v 1.3 2024/07/10 17:39:58 raeburn Exp $ -->

<!--

This file is part of the LearningOnline Network with CAPA (LON-CAPA).

LON-CAPA is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2 of the License, or
(at your option) any later version.

LON-CAPA is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with LON-CAPA; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA

/home/httpd/html/adm/gpl.txt

http://www.lon-capa.org/

-->

<piml>
<targetroot>/</targetroot>
<files>
<file>
<target dist="default">/home/httpd/perl</target>
<perlscript mode="fg" dist="fedora34 fedora35 fedora36 fedora37 fedora38 fedora39 fedora40 debian12 ubuntu22 ubuntu24 centos9-stream rhes9 oracle9 rocky9 alma9">

use strict;

my $bracketed_warning;
if (open(PIPE,"/bin/su -s /bin/bash -c 'bind -V 2>&1' www |grep enable-bracketed-paste |")) {
    my $info = &lt;PIPE&gt;;
    chomp($info);
    my ($bracketed) = ($info =~ /^\Qenable-bracketed-paste\E\s+is\s+set\s+to\s+\W(on|off)\W$/);
    close(PIPE);
    if ($bracketed eq 'on') {
        $bracketed_warning = 1;
    }
} else {
    print "Unable to check if bracketed paste is set to off for www user's shell\n"; 
}

if ($bracketed_warning) {
    print &lt;&lt;"END";
**** ERROR: Problems which include calls to R statistics engine will not work.
You need to create a file: /home/www/.inputrc containing the following line:
set enable-bracketed-paste to off
END
}

</perlscript>
</file>
</files>
</piml>

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>