/[baselayout]/trunk/net-scripts/net.modules.d/pppd
Gentoo

Diff of /trunk/net-scripts/net.modules.d/pppd

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1627 Revision 1628
54# char* remotename, char* password) 54# char* remotename, char* password)
55# 55#
56# Add/update PAP/CHAP authentication information 56# Add/update PAP/CHAP authentication information
57pppd_update_secrets_file() { 57pppd_update_secrets_file() {
58 local filepath="$1" username="$2" remotename="$3" password="$4" 58 local filepath="$1" username="$2" remotename="$3" password="$4"
59 if [[ ! -f ${filepath} ]]; then 59 if [[ ! -s ${filepath} ]]; then
60 touch ${filepath} && \ 60 echo '#'client$'\t'server$'\t'secret$'\t'IP addresses > "${filepath}" \
61 chmod 0600 ${filepath} || \ 61 && chmod 0600 "${filepath}" \
62 return 1 62 || return 1
63 fi 63 fi
64 64
65 #escape username and remotename, used in following sed calls 65 #escape username and remotename, used in following sed calls
66 local regex_username=$(pppd_regex_escape ${username}) 66 local regex_username=$(pppd_regex_escape ${username})
67 local regex_remotename=$(pppd_regex_escape ${remotename}) 67 local regex_remotename=$(pppd_regex_escape ${remotename})

Legend:
Removed from v.1627  
changed lines
  Added in v.1628

  ViewVC Help
Powered by ViewVC 1.1.20