mkdir -p './polkit-1/localauthority/30-site.d'
mkdir -p './polkit-1/localauthority/50-local.d'
mkdir -p './polkit-1/localauthority/90-mandatory.d'
+mkdir -p './ppp/peers'
mkdir -p './security/limits.d'
mkdir -p './security/namespace.d'
mkdir -p './skel/.ssh'
maybe chmod 0644 './modprobe.d/blacklist.conf'
maybe chmod 0644 './modprobe.d/i386.conf'
maybe chmod 0644 './modprobe.d/pnp-aliases.conf'
+maybe chmod 0644 './modprobe.d/ppp.conf'
maybe chmod 0644 './modprobe.d/usb-load-ehci-first.conf'
maybe chmod 0644 './mtab'
maybe chmod 0755 './mysql'
maybe chmod 0644 './pam.d/passwd'
maybe chmod 0644 './pam.d/polkit-1'
maybe chmod 0644 './pam.d/pop'
+maybe chmod 0644 './pam.d/ppp'
maybe chmod 0644 './pam.d/screen'
maybe chmod 0644 './pam.d/shadow'
maybe chmod 0644 './pam.d/sshd'
maybe chmod 0755 './portage/savedconfig'
maybe chmod 0755 './portage/savedconfig/sys-apps'
maybe chmod 0644 './portage/savedconfig/sys-apps/busybox-1.19.3-r1'
+maybe chmod 0755 './ppp'
+maybe chmod 0600 './ppp/chap-secrets.example'
+maybe chmod 0755 './ppp/ip-down'
+maybe chmod 0755 './ppp/ip-down.d'
+maybe chmod 0644 './ppp/ip-down.d/30-wins.sh'
+maybe chmod 0644 './ppp/ip-down.d/40-dns.sh'
+maybe chmod 0644 './ppp/ip-down.d/50-initd.sh'
+maybe chmod 0755 './ppp/ip-up'
+maybe chmod 0755 './ppp/ip-up.d'
+maybe chmod 0644 './ppp/ip-up.d/30-wins.sh'
+maybe chmod 0644 './ppp/ip-up.d/40-dns.sh'
+maybe chmod 0644 './ppp/ip-up.d/50-initd.sh'
+maybe chmod 0644 './ppp/options'
+maybe chmod 0600 './ppp/pap-secrets.example'
+maybe chmod 0755 './ppp/peers'
maybe chmod 0644 './profile'
maybe chmod 0755 './profile.d'
maybe chmod 0644 './profile.d/.keep'
--- /dev/null
+alias char-major-108 ppp_generic
+alias /dev/ppp ppp_generic
+alias tty-ldisc-3 ppp_async
+alias tty-ldisc-13 n_hdlc
+alias tty-ldisc-14 ppp_synctty
+alias ppp-compress-18 ppp_mppe
+alias ppp-compress-21 bsd_comp
+alias ppp-compress-24 ppp_deflate
+alias ppp-compress-26 ppp_deflate
+alias net-pf-24 pppoe
--- /dev/null
+# File autogenerated by pamd_mimic in pam eclass
+
+
+auth include system-auth
+account include system-auth
+session include system-auth
--- /dev/null
+# Secrets for authentication using CHAP
+# client server secret IP addresses
--- /dev/null
+#!/bin/sh
+
+# This script is run by pppd after the link is brought down.
+# It executes all the scripts available in /etc/ppp/ip-down.d directory,
+# with the following parameters:
+# $1 = interface name (e.g. ppp0)
+# $2 = tty device
+# $3 = speed
+# $4 = local IP address
+# $5 = remote IP address
+# $6 = ipparam (user specified parameter, see man pppd)
+
+cd /etc/ppp/ip-down.d || exit
+
+for SCRIPT in *.sh ; do
+ . ./"${SCRIPT}" "$@"
+done
--- /dev/null
+#!/bin/sh
+
+# Remove WINS servers from smb.conf
+# Used parameters and environment variables:
+# $1 - interface name (e.g. ppp0)
+# $USEPEERWINS - set if user specified usepeerdns
+# $WINS1 and $WINS2 - WINS servers reported by peer
+
+if [ "$USEPEERWINS" = 1 -a -f /etc/samba/smb.conf ]; then
+ # Remove the WINS servers
+ winsservers=
+ [ -n "$WINS1" ] && winsservers="$winsservers $1:$WINS1"
+ [ -n "$WINS2" ] && winsservers="$winsservers $1:$WINS2"
+ sed -i -e "s/^\([[:space:]]*wins[[:space:]]*server[[:space:]]*=[^#]*\) $winsservers /\1/i" /etc/samba/smb.conf
+
+ # Reload nmbd configuration
+ smbcontrol nmbd reload-config
+fi
--- /dev/null
+#!/bin/sh
+
+# Restore DNS resolver settings
+# Used parameters and environment variables:
+# $1 - interface name (e.g. ppp0)
+# $USEPEERDNS - set if user specified usepeerdns
+
+if [ "$USEPEERDNS" ]; then
+ if [ -x /sbin/resolvconf ]; then
+ /sbin/resolvconf -d "$1"
+ else
+ # taken from debian's 0000usepeerdns
+ # follow any symlink to find the real file
+ REALRESOLVCONF=$(readlink -f /etc/resolv.conf)
+
+ if [ "$REALRESOLVCONF" != "/etc/ppp/resolv.conf" ]; then
+
+ # if an old resolv.conf file exists, restore it
+ if [ -e $REALRESOLVCONF.pppd-backup ]; then
+ mv $REALRESOLVCONF.pppd-backup $REALRESOLVCONF
+ fi
+
+ fi
+ fi
+fi
--- /dev/null
+#!/bin/sh
+
+# Deactivates correspondent net.${iface} service
+# Used parameters and environment variables:
+# $1 - interface name (e.g. ppp0)
+
+if [ -x /etc/init.d/net.$1 ]; then
+ if /etc/init.d/net.$1 --quiet status ; then
+ export IN_BACKGROUND="true"
+ /etc/init.d/net.$1 --quiet stop
+ fi
+fi
--- /dev/null
+#!/bin/sh
+
+# This script is run by pppd after the link is established.
+# It executes all the scripts available in /etc/ppp/ip-up.d directory,
+# with the following parameters:
+# $1 = interface name (e.g. ppp0)
+# $2 = tty device
+# $3 = speed
+# $4 = local IP address
+# $5 = remote IP address
+# $6 = ipparam (user specified parameter, see man pppd)
+
+cd /etc/ppp/ip-up.d || exit
+
+for SCRIPT in *.sh ; do
+ . ./"${SCRIPT}" "$@"
+done
--- /dev/null
+#!/bin/sh
+
+# Handle smb.conf updating when the usepeerwins pppd option is being used.
+# Used parameters and environment variables:
+# $1 - interface name (e.g. ppp0)
+# $USEPEERWINS - set if user specified usepeerdns
+# $WINS1 and $WINS2 - WINS servers reported by peer
+# Will additionally "tag" the wins servers, as explained in smb.conf(5), using the $1 value.
+
+if [ "$USEPEERWINS" = 1 -a -f /etc/samba/smb.conf ]; then
+ # Add global section if it is needed
+ grep -qi '\[[[:space:]]*global[[:space:]]*\]' /etc/samba/smb.conf \
+ || sed -i -e '1i[global]' /etc/samba/smb.conf
+
+ # Add wins server line if is missing
+ grep -qi '^[[:space:]]*wins[[:space:]]*server[[:space:]]*=' /etc/samba/smb.conf \
+ || sed -i -e '/\[[[:space:]]*global[[:space:]]*\]/a\ wins server =' /etc/samba/smb.conf
+
+ # Set the WINS servers
+ winsservers=
+ [ -n "$WINS1" ] && winsservers="$winsservers $1:$WINS1"
+ [ -n "$WINS2" ] && winsservers="$winsservers $1:$WINS2"
+ sed -i -e "s/^\([[:space:]]*wins[[:space:]]*server[[:space:]]*=[^#]*\)/\1 $winsservers /i" /etc/samba/smb.conf
+
+ # Reload nmbd configuration
+ smbcontrol nmbd reload-config
+fi
--- /dev/null
+#!/bin/sh
+
+# Handle resolv.conf generation when usepeerdns pppd option is being used.
+# Used parameters and environment variables:
+# $1 - interface name (e.g. ppp0)
+# $USEPEERDNS - set if user specified usepeerdns
+# $DNS1 and $DNS2 - DNS servers reported by peer
+
+if [ "$USEPEERDNS" ]; then
+
+ if [ -x /sbin/resolvconf ]; then
+ {
+ echo "# Generated by ppp for $1"
+ [ -n "$DNS1" ] && echo "nameserver $DNS1"
+ [ -n "$DNS2" ] && echo "nameserver $DNS2"
+ } | /sbin/resolvconf -a "$1"
+ else
+ # add the server supplied DNS entries to /etc/resolv.conf
+ # (taken from debian's 0000usepeerdns)
+
+ # follow any symlink to find the real file
+ REALRESOLVCONF=$(readlink -f /etc/resolv.conf)
+
+ if [ "$REALRESOLVCONF" != "/etc/ppp/resolv.conf" ]; then
+
+ # merge the new nameservers with the other options from the old configuration
+ {
+ grep --invert-match '^nameserver[[:space:]]' $REALRESOLVCONF
+ cat /etc/ppp/resolv.conf
+ } > $REALRESOLVCONF.tmp
+
+ # backup the old configuration and install the new one
+ cp -dpP $REALRESOLVCONF $REALRESOLVCONF.pppd-backup
+ mv $REALRESOLVCONF.tmp $REALRESOLVCONF
+
+ # correct permissions
+ chmod 0644 /etc/resolv.conf
+ chown root:root /etc/resolv.conf
+ fi
+ fi
+
+fi
--- /dev/null
+#!/bin/sh
+
+# Activates correspondent net.${iface} service
+# Used parameters and environment variables:
+# $1 - interface name (e.g. ppp0)
+
+if [ -x /etc/init.d/net.$1 ]; then
+ if ! /etc/init.d/net.$1 --quiet status ; then
+ export IN_BACKGROUND="true"
+ /etc/init.d/net.$1 --quiet start
+ fi
+fi
--- /dev/null
+ip-down
\ No newline at end of file
--- /dev/null
+ip-up
\ No newline at end of file
--- /dev/null
+# Secrets for authentication using PAP
+# client server secret IP addresses