View | Details | Raw Unified | Return to bug 15144
Collapse All | Expand All

(-)/usr/lib/alterator/backend3/proxy (-8 / +17 lines)
Lines 89-94 Link Here
89
	for var in $VARS; do
89
	for var in $VARS; do
90
		shell_add_or_subst "export $var=" "$PROXY" "$SETTINGS"
90
		shell_add_or_subst "export $var=" "$PROXY" "$SETTINGS"
91
	done
91
	done
92
93
	if [ "$in_server" = "" ] && [ "$in_portr" = "" ] && [ "$in_login" = "" ] && [ "$in_password" = "" ]; then
94
		echo > "$SETTINGS"
95
	fi
96
92
	chmod 0755 "$SETTINGS"
97
	chmod 0755 "$SETTINGS"
93
98
94
	echo '()'
99
	echo '()'
Lines 97-110 Link Here
97
102
98
constraints()
103
constraints()
99
{
104
{
100
	local required="$([ "$in_orig_action" = "new" ] && echo "#t" || echo "#f")"
105
	if [ "$in_server" = "" ] && [ "$in_portr" = "" ] && [ "$in_login" = "" ] && [ "$in_password" = "" ]; then
101
	echo '('
106
		echo "#t"
102
	printf 'server (required #t match ("^[[:alnum:].-]+$" "%s") label "%s")' \
107
	else
103
	"`_ "invalid proxy hostname"`" "`_ "Server"`"
108
		local required="$([ "$in_orig_action" = "new" ] && echo "#t" || echo "#f")"
104
	printf 'port  (required #t match ("^[0-9]+$"  "%s")  default "3128" label "%s")' \
109
		echo '('
105
	"`_ "should be a number"`" \
110
		printf 'server (required #t match ("^[[:alnum:].-]+$" "%s") label "%s")' \
106
	"`_ "Port"`"
111
		"`_ "invalid proxy hostname"`" "`_ "Server"`"
107
	echo ')'
112
		printf 'port  (required #t match ("^[0-9]+$"  "%s")  default "3128" label "%s")' \
113
		"`_ "should be a number"`" \
114
		"`_ "Port"`"
115
		echo ')'
116
	fi
108
}
117
}
109
118
110
_()
119
_()

Return to bug 15144