Project

General

Profile

Download (1.75 KB) Statistics
| Branch: | Tag: | Revision:
1 ac24dc24 Renato Botelho
#
2
# dot.shrc
3
#
4
# part of pfSense (https://www.pfsense.org)
5 81299b5c Renato Botelho
# Copyright (c) 2004-2016 Rubicon Communications, LLC (Netgate)
6 ac24dc24 Renato Botelho
# All rights reserved.
7
#
8 b12ea3fb Renato Botelho
# 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 ac24dc24 Renato Botelho
#
12 b12ea3fb Renato Botelho
# http://www.apache.org/licenses/LICENSE-2.0
13 ac24dc24 Renato Botelho
#
14 b12ea3fb Renato Botelho
# 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 ac24dc24 Renato Botelho
20 a5c36eb2 Renato Botelho
HTTP_PROXY=`/usr/local/sbin/read_xml_tag.sh string system/proxyurl`
21 d9692996 jim-p
if [ "${HTTP_PROXY}" != "" ]; then
22 a5c36eb2 Renato Botelho
	HTTP_PROXY_PORT=`/usr/local/sbin/read_xml_tag.sh string system/proxyport`
23 d9692996 jim-p
	if [ "${HTTP_PROXY_PORT}" != "" ]; then
24
		HTTP_PROXY="${HTTP_PROXY}:${HTTP_PROXY_PORT}"
25
	fi
26
	export HTTP_PROXY
27
fi
28 1060378f jim-p
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 d9692996 jim-p
35 f09aede6 Renato Botelho
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 d9692996 jim-p
# Detect interactive logins and display the shell
42 fbe3b3ab Renato Botelho
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 d9692996 jim-p
	/etc/rc.initial
55
	exit
56
fi