Project

General

Profile

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

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

    
35
USE_MFS_TMPVAR=$(/usr/local/sbin/read_xml_tag.sh boolean system/use_mfs_tmpvar)
36
if [ "${USE_MFS_TMPVAR}" = "true" ]; then
37
	export PKG_DBDIR='/root/var/db/pkg'
38
	export PKG_CACHEDIR='/root/var/cache/pkg'
39
fi
40

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

    
53
if [ -n "${_interactive}" ]; then
54
	/etc/rc.initial
55
	exit
56
fi
(3-3/4)