summaryrefslogtreecommitdiffstats
path: root/perl-install/crypto.pm
diff options
context:
space:
mode:
authorNicolas Planel <nplanel@mandriva.com>2003-12-15 13:46:45 +0000
committerNicolas Planel <nplanel@mandriva.com>2003-12-15 13:46:45 +0000
commit4f1200a2d83c185d6f5da855f12dcc6803929573 (patch)
treed1f6a91b6607d20669046352f2c589b07eec2381 /perl-install/crypto.pm
parentb418b79b8b7e40cf164cb2a21b6c3fa25a2056a6 (diff)
downloaddrakx-4f1200a2d83c185d6f5da855f12dcc6803929573.tar
drakx-4f1200a2d83c185d6f5da855f12dcc6803929573.tar.gz
drakx-4f1200a2d83c185d6f5da855f12dcc6803929573.tar.bz2
drakx-4f1200a2d83c185d6f5da855f12dcc6803929573.tar.xz
drakx-4f1200a2d83c185d6f5da855f12dcc6803929573.zip
generate modprobe.conf when writing modules.conf
Diffstat (limited to 'perl-install/crypto.pm')
0 files changed, 0 insertions, 0 deletions
nameserver*) if [[ "${grep_regexp}" != ".*" ]]; then continue else echo "${line}" >> "${tmp_file}" fi ;; domain* | search*) if [ -n "${DOMAIN}" ]; then read search value < <(echo ${line}) search_str+=" ${value}" else echo "${line}" >> "${tmp_file}" fi ;; # Keep the rest of the /etc/resolv.conf as it was: *) echo "${line}" >> "${tmp_file}" ;; esac done < /etc/resolv.conf # Insert the domain into 'search' field: if [ -n "${DOMAIN}" ]; then echo "search ${DOMAIN}${search_str}" >> "${tmp_file}" fi # Add the requested nameserver entries: [ -n "${DNS1}" ] && echo "nameserver ${DNS1}" >> "${tmp_file}" [ -n "${DNS2}" ] && echo "nameserver ${DNS2}" >> "${tmp_file}" [ -n "${DNS3}" ] && echo "nameserver ${DNS3}" >> "${tmp_file}" # Backup resolv.conf only if it doesn't exist already: ! [ -f /etc/resolv.conf.save ] && cp -af /etc/resolv.conf /etc/resolv.conf.save # Maintain permissions, but set umask in case it doesn't exist: umask_old=$(umask) umask 022 # Update the resolv.conf: change_resolv_conf "${tmp_file}" rm -f "${tmp_file}" umask ${umask_old} unset tmp_file search_str umask_old else net_log $"/etc/resolv.conf was not updated: failed to create temporary file" 'err' 'ifup-post' fi fi unset grep_regexp fi # don't set hostname on ppp/slip connections if [ "$2" = "boot" -a \ "${DEVICE}" != lo -a \ "${DEVICETYPE}" != "ppp" -a \ "${DEVICETYPE}" != "slip" ]; then if need_hostname; then IPADDR=$(LANG=C ip -o -4 addr ls dev ${DEVICE} | awk '{ print $4 ; exit }') eval $(/bin/ipcalc --silent --hostname ${IPADDR} ; echo "status=$?") if [ "$status" = "0" ]; then set_hostname $HOSTNAME fi fi fi # Set firewall ZONE for this device (empty ZONE means default): if [ "${REALDEVICE}" != "lo" ]; then dbus-send --print-reply --system --dest=org.fedoraproject.FirewallD1 \ /org/fedoraproject/FirewallD1 \ org.fedoraproject.FirewallD1.zone.changeZoneOfInterface \ string:"${ZONE}" string:"${DEVICE}" \ > /dev/null 2>&1 fi if [ -x /sbin/ifup-local ]; then /sbin/ifup-local ${DEVICE} fi exit 0