Project

General

Profile

Download (1.9 KB) Statistics
| Branch: | Tag: | Revision:
1
#
2
# dot.shrc
3
#
4
# part of pfSense (https://www.pfsense.org)
5
# Copyright (c) 2004-2013 BSD Perimeter
6
# Copyright (c) 2013-2016 Electric Sheep Fencing
7
# Copyright (c) 2014-2022 Rubicon Communications, LLC (Netgate)
8
# All rights reserved.
9
#
10
# Licensed under the Apache License, Version 2.0 (the "License");
11
# you may not use this file except in compliance with the License.
12
# You may obtain a copy of the License at
13
#
14
# http://www.apache.org/licenses/LICENSE-2.0
15
#
16
# Unless required by applicable law or agreed to in writing, software
17
# distributed under the License is distributed on an "AS IS" BASIS,
18
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
# See the License for the specific language governing permissions and
20
# limitations under the License.
21

    
22
HTTP_PROXY=`/usr/local/sbin/read_xml_tag.sh string system/proxyurl`
23
if [ "${HTTP_PROXY}" != "" ]; then
24
	HTTP_PROXY_PORT=`/usr/local/sbin/read_xml_tag.sh string system/proxyport`
25
	if [ "${HTTP_PROXY_PORT}" != "" ]; then
26
		HTTP_PROXY="${HTTP_PROXY}:${HTTP_PROXY_PORT}"
27
	fi
28
	export HTTP_PROXY
29
fi
30
HTTP_PROXY_AUTH_USER=`/usr/local/sbin/read_xml_tag.sh string system/proxyuser`
31
HTTP_PROXY_AUTH_PASS=`/usr/local/sbin/read_xml_tag.sh string system/proxypass`
32
if [ "${HTTP_PROXY_AUTH_USER}" != "" ] && [ "${HTTP_PROXY_AUTH_PASS}" != "" ]; then
33
	HTTP_PROXY_AUTH="basic:*:${HTTP_PROXY_AUTH_USER}:${HTTP_PROXY_AUTH_PASS}"
34
	export HTTP_PROXY_AUTH
35
fi
36

    
37
USE_MFS_TMPVAR=$(/usr/local/sbin/read_xml_tag.sh boolean system/use_mfs_tmpvar)
38
# if [ "${USE_MFS_TMPVAR}" = "true" ] && [ ! -f /conf/ram_disks_failed ]; then
39
#	export PKG_DBDIR='/root/var/db/pkg'
40
#	export PKG_CACHEDIR='/root/var/cache/pkg'
41
# fi
42

    
43
# Detect interactive logins and display the shell
44
unset _interactive
45
if [ -n "${SSH_TTY}" ]; then
46
	_interactive=1
47
else
48
	case "${TERM}" in
49
	cons25|xterm|vt100|vt102|vt220)
50
		_interactive=1
51
		;;
52
	esac
53
fi
54

    
55
if [ -n "${_interactive}" ]; then
56
	/usr/bin/resizewin -z
57
	/etc/rc.initial
58
	exit
59
fi
(3-3/4)