echo -n "${DNS1}" > /var/ipfire/red/dns1
echo -n "${DNS2}" > /var/ipfire/red/dns2
+ run_subdir ${rc_base}/init.d/networking/red.up/
+
elif [ "${TYPE}" == "DHCP" ]; then
boot_mesg -n "Starting dhcpcd on the ${DEVICE} interface..."
echo -n "${DEVICE}" > /var/ipfire/red/iface
/usr/sbin/pppoe-start
evaluate_retval
fi
-
- for i in $( ls -v ${rc_base}/init.d/networking/red.up/* 2> /dev/null); do
- check_script_status
- OUT=$(echo $(basename ${i}) | awk -F- '{ print $2 }')
- case "$OUT" in
- S) ${i} start ;;
- K) ${i} stop ;;
- RS) ${i} restart ;;
- RL) ${i} reload ;;
- *) ${i} ;;
- esac
- done
;;
stop)
ip addr del ${args} dev ${DEVICE}
evaluate_retval
+ run_subdir ${rc_base}/init.d/networking/red.down/
+
elif [ "$TYPE" == "DHCP" ]; then
boot_mesg -n "Stopping dhcpcd on the ${DEVICE} interface..."
if [ -e $LEASEINFO ]; then
fi
rm -f /var/ipfire/red/{active,device,dial-on-demand,dns1,dns2,local-ipaddress,remote-ipaddress,resolv.conf}
- for i in $( ls -v ${rc_base}/init.d/networking/red.down/* 2> /dev/null); do
- check_script_status
- OUT=$(echo $(basename ${i}) | awk -F- '{ print $2 }')
- case "$OUT" in
- S) ${i} start ;;
- K) ${i} stop ;;
- RS) ${i} restart ;;
- RL) ${i} reload ;;
- *) ${i} ;;
- esac
- done
;;
esac
newtComponent statictyperadio;
newtComponent dhcptyperadio;
newtComponent pppoetyperadio;
-newtComponent pptptyperadio;
newtComponent dhcphostnameentry;
/* acceptable character filter for IP and netmaks entry boxes */
int startstatictype = 0;
int startdhcptype = 0;
int startpppoetype = 0;
- int startpptptype = 0;
/* Build some key strings. */
sprintf(addressfield, "%s_ADDRESS", colour);
if (strcmp(temp, "STATIC") == 0) startstatictype = 1;
if (strcmp(temp, "DHCP") == 0) startdhcptype = 1;
if (strcmp(temp, "PPPOE") == 0) startpppoetype = 1;
- if (strcmp(temp, "PPTP") == 0) startpptptype = 1;
statictyperadio = newtRadiobutton(2, 4, ctr[TR_STATIC], startstatictype, NULL);
dhcptyperadio = newtRadiobutton(2, 5, "DHCP", startdhcptype, statictyperadio);
pppoetyperadio = newtRadiobutton(2, 6, "PPPOE", startpppoetype, dhcptyperadio);
- pptptyperadio = newtRadiobutton(2, 7, "PPTP", startpptptype, pppoetyperadio);
newtFormAddComponents(networkform, statictyperadio, dhcptyperadio,
- pppoetyperadio, pptptyperadio, NULL);
+ pppoetyperadio, NULL);
newtComponentAddCallback(statictyperadio, networkdialogcallbacktype, NULL);
newtComponentAddCallback(dhcptyperadio, networkdialogcallbacktype, NULL);
newtComponentAddCallback(pppoetyperadio, networkdialogcallbacktype, NULL);
- newtComponentAddCallback(pptptyperadio, networkdialogcallbacktype, NULL);
dhcphostnamelabel = newtTextbox(2, 9, 18, 1, 0);
newtTextboxSetText(dhcphostnamelabel, ctr[TR_DHCP_HOSTNAME]);
strcpy(temp, defaultdhcphostname);
findkey(kv, addressfield, temp);
addressentry = newtEntry(20, (typeflag ? 11 : 4) + 0, temp, 20, &addressresult, 0);
newtEntrySetFilter(addressentry, ip_input_filter, NULL);
- if (typeflag == 1 && startstatictype == 0 && startpptptype == 0 )
+ if (typeflag == 1 && startstatictype == 0)
newtEntrySetFlags(addressentry, NEWT_FLAG_DISABLED, NEWT_FLAGS_SET);
newtFormAddComponent(networkform, addresslabel);
newtFormAddComponent(networkform, addressentry);
strcpy(temp, "255.255.255.0"); findkey(kv, netmaskfield, temp);
netmaskentry = newtEntry(20, (typeflag ? 11 : 4) + 1, temp, 20, &netmaskresult, 0);
newtEntrySetFilter(netmaskentry, ip_input_filter, NULL);
- if (typeflag == 1 && startstatictype == 0 && startpptptype == 0 )
+ if (typeflag == 1 && startstatictype == 0)
newtEntrySetFlags(netmaskentry, NEWT_FLAG_DISABLED, NEWT_FLAGS_SET);
newtFormAddComponent(networkform, netmasklabel);
strcpy(type, "STATIC");
if (typeflag)
gettype(type);
- if (strcmp(type, "STATIC") == 0 || strcmp(type, "PPTP") == 0 )
+ if (strcmp(type, "STATIC") == 0)
{
if (inet_addr(addressresult) == INADDR_NONE)
{
if (typeflag)
{
replacekeyvalue(kv, dhcphostnamefield, dhcphostnameresult);
- if (strcmp(type, "STATIC") != 0 && strcmp(type, "PPTP") != 0)
+ if (strcmp(type, "STATIC") != 0)
{
replacekeyvalue(kv, addressfield, "0.0.0.0");
replacekeyvalue(kv, netmaskfield, "0.0.0.0");
strcpy(type, "DHCP");
else if (selected == pppoetyperadio)
strcpy(type, "PPPOE");
- else if (selected == pptptyperadio)
- strcpy(type, "PPTP");
else
strcpy(type, "ERROR");
gettype(type);
- if (strcmp(type, "STATIC") != 0 && strcmp(type, "PPTP") != 0 )
+ if (strcmp(type, "STATIC") != 0)
{
newtEntrySetFlags(addressentry, NEWT_FLAG_DISABLED, NEWT_FLAGS_SET);
newtEntrySetFlags(netmaskentry, NEWT_FLAG_DISABLED, NEWT_FLAGS_SET);