From 1b60656c73f8bb924b73b6d4dffb0dd5a3521420 Mon Sep 17 00:00:00 2001 From: Silvan Calarco Date: Thu, 2 May 2013 15:53:43 +0200 Subject: [PATCH] Added proxy profile.d script which reads /etc/sysconfig/proxy; added sudoers.d file for exporing variables --- Makefile | 4 ++++ etc/profile.d/proxy.sh | 9 +++++++++ etc/sudoers.d/proxy | 1 + etc/sysconfig/proxy | 17 +++++++++++++++++ 4 files changed, 31 insertions(+) create mode 100644 etc/profile.d/proxy.sh create mode 100644 etc/sudoers.d/proxy create mode 100644 etc/sysconfig/proxy diff --git a/Makefile b/Makefile index 8ae03fc..df2b2bd 100644 --- a/Makefile +++ b/Makefile @@ -172,7 +172,11 @@ endif @$(INSTALL_DIR) $(DESTDIR)$(mambaimagesdir) cp -r etc/polkit-1 $(DESTDIR)$(sysconfdir)/ cp -r etc/prelink.conf.d $(DESTDIR)$(sysconfdir)/ + cp -r etc/profile.d $(DESTDIR)$(sysconfdir)/ + cp -r etc/sudoers.d $(DESTDIR)$(sysconfdir)/ + cp -r etc/sysconfig $(DESTDIR)$(sysconfdir)/ cp -r etc/xprofile.d $(DESTDIR)$(sysconfdir)/ + chmod 755 $(DESTDIR)$(sysconfdir)/profile.d/*.sh chmod 755 $(DESTDIR)$(sysconfdir)/xprofile.d/*.sh $(INSTALL_SCRIPT) kde/scripts/showlog $(DESTDIR)$(distrobindir) cp -r menu/icons/ $(DESTDIR)$(datadir)/icons/ diff --git a/etc/profile.d/proxy.sh b/etc/profile.d/proxy.sh new file mode 100644 index 0000000..912c29b --- /dev/null +++ b/etc/profile.d/proxy.sh @@ -0,0 +1,9 @@ +# +# openmamba system-wide proxy configuration +# +[ -e /etc/sysconfig/proxy ] && . /etc/sysconfig/proxy +[ "$http_proxy" ] && export HTTP_PROXY=$http_proxy +[ "$https_proxy" ] && export HTTPS_PROXY=$https_proxy +[ "$ftp_proxy" ] && export FTP_PROXY=$ftp_proxy +[ "$socks_proxy" ] && export SOCKS_PROXY=$socks_proxy +[ "$no_proxy" ] && export NO_PROXY=$no_proxy diff --git a/etc/sudoers.d/proxy b/etc/sudoers.d/proxy new file mode 100644 index 0000000..8317413 --- /dev/null +++ b/etc/sudoers.d/proxy @@ -0,0 +1 @@ +Defaults env_keep += "ftp_proxy http_proxy https_proxy socks_proxy no_proxy FTP_PROXY HTTP_PROXY HTTPS_PROXY SOCKS_PROXY NO_PROXY" diff --git a/etc/sysconfig/proxy b/etc/sysconfig/proxy new file mode 100644 index 0000000..087d1dc --- /dev/null +++ b/etc/sysconfig/proxy @@ -0,0 +1,17 @@ +# System proxy configuration file + +# Here some examples: + +# http_proxy=http://proxy.example.com:8080 +# https_proxy=http://proxy.example.com:8080 +# ftp_proxy=http://proxy.example.com:8080 +# socks_proxy=http://proxy.example.com:8080 +# no_proxy=localhost,127.0.0.1 + +# http_proxy=http://user:password@proxy.example.com:3128 +# https_proxy=http://user:password@proxy.example.com:3128 +# ftp_proxy=http://user:password@proxy.example.com:3128 + +# http_proxy=http://domain\\user:password@proxy.example.com:8080 +# https_proxy=http://domain\\user:password@proxy.example.com:8080 +# ftp_proxy=http://domain\\user:password@proxy.example.com:8080