action=${2}
# Read the configuration file of this hook.
-zone_config_settings_read "${zone}" "pppoe-server"
+zone_config_settings_read_by_hook "${zone}" "pppoe-server"
assert isset SUBNET
pppd_options="${RUN_DIR}/${zone}/pppoe-server-options"
# Add the interface to listen to.
pppoe_cmdline="${pppoe_cmdline} -I ${zone}"
- # Enable kernel-mode PPPoE.
- # (The version that is shipped with IPFire does not
- # support the userspace implementation and therefore
- # kernel-mode PPPoE is enabled by default).
- #pppoe_cmdline="${pppoe_cmdline} -k"
-
# Randomize session IDs.
pppoe_cmdline="${pppoe_cmdline} -r"
fi
# Create the pppoe-server-options file.
- pppoe_server_options ${pppd_options} ${zone}
+ pppoe_server_options ${pppd_options} ${zone} \
+ --dns-servers="${DNS_SERVERS}"
pppoe_cmdline="${pppoe_cmdline} -O ${pppd_options}"
# Configure the IP addresses.
log DEBUG "pppoe-server options: ${pppoe_cmdline}"
# Now exec the actual pppoe-server binary.
- exec pppoe-server ${pppoe_cmdline}
+ exec /usr/sbin/pppoe-server ${pppoe_cmdline}
error "Could not execute pppoe-server. Exiting."
exit ${EXIT_ERROR}