alterator-net-pppoe-0.7/000075500000000000000000000000001117070357500152665ustar00rootroot00000000000000alterator-net-pppoe-0.7/Makefile000064400000000000000000000001751117070357500167310ustar00rootroot00000000000000NAME=net-pppoe INSTALL=/usr/bin/install all: clean: install: install-module include /usr/share/alterator/build/module.mak alterator-net-pppoe-0.7/applications/000075500000000000000000000000001117070357500177545ustar00rootroot00000000000000alterator-net-pppoe-0.7/applications/net-pppoe.desktop000064400000000000000000000004471117070357500232630ustar00rootroot00000000000000[Desktop Entry] Type=Application Categories=X-Alterator-Network Icon=net-pppoe Terminal=false Name=PPPoE connections X-Alterator-URI=/net-pppoe X-Alterator-Help=net-pppoe Name[ru]=PPPoE-соединения Name[uk]=PPPoE-з'єднання Name[pt_BR]=PPPoE Conexões Name[es]=PPPoE conecciones alterator-net-pppoe-0.7/backend3/000075500000000000000000000000001117070357500167405ustar00rootroot00000000000000alterator-net-pppoe-0.7/backend3/net-pppoe000075500000000000000000000055651117070357500206100ustar00rootroot00000000000000#!/bin/sh -f wait_time=3 alterator_api_version=1 . alterator-sh-functions . alterator-net-functions . alterator-hw-functions ### shell file helpers read_connection() { local name="/etc/net/ifaces/$1" local info= netdev_is_up "$1" && info="`_ "connection established"`" || info="`_ "connection failed"`" write_string_param info "$info" local iface="$(read_iface_option "$name" HOST)" [ -n "$iface" ] || iface="$(list_eth|head -n1)" write_string_param iface "$iface" write_string_param login "$(read_ppp_option "$name" user)" write_bool_param 'mppe' "$(read_ppp_option1 "$name" 'require-mppe' 'nomppe')" } write_connection() { [ "$1" = "/" ] && return local name="/etc/net/ifaces/$1" [ -d "$name" ] || mkdir -- "$name" [ -n "$in_iface" ] && write_iface_option "$name" HOST "$in_iface" [ -n "$in_login" ] && write_ppp_option "$name" user "$in_login" [ -n "$in_password" ] && write_ppp_option "$name" password "$(echo "$in_password"|sed -e 's/["]/\\\\&/g')" test_bool "$in_mppe" write_ppp_option1 "$name" 'require-mppe' 'nomppe' "$?" } new_connection() { local name="/etc/net/ifaces/$1" mkdir -p -- "$name" write_iface_option "$name" TYPE ppp write_iface_option "$name" ONBOOT yes write_iface_option "$name" PPPTYPE pppoe write_iface_option "$name" PPPPERSIST on write_iface_option "$name" PPPMAXFAIL 0 # https://bugzilla.altlinux.org/show_bug.cgi?id=15603 cat>"$name/pppoptions"<


Status:
Interface:
Account:
Password:
  MPPE encryption
 
    
alterator-net-pppoe-0.7/ui/net-pppoe/index.scm000064400000000000000000000047411117070357500214330ustar00rootroot00000000000000(document:surround "/std/frame") ;;; Functions (define (init-iface) (form-update-enum "iface" (woo-list "/net-pppoe/avail_iface")) (form-update-enum "status" (woo-list "/net-pppoe/avail_state"))) (define (read-current-iface) (read-iface (or (form-value "name") ""))) (define (read-iface name) (catch/message (lambda() (let ((data (woo-read-first "/net-pppoe/" 'name name))) (form-update-enum "name" (woo-list "/net-pppoe/avail_connection")) (form-update-value "password" "") (form-update-value-list '("name" "new_name" "info" "status" "iface" "login" "mppe") data))))) (define (write-iface) (catch/message (lambda() (apply woo-write "/net-pppoe" 'commit #t (form-value-list)) (read-iface (form-value "name"))))) (define (new-iface) (catch/message (lambda() (let ((new_name (form-value "new_name"))) (woo-write "/net-pppoe" 'new #t 'new_name new_name) (read-iface new_name))))) (define (delete-iface) (catch/message (lambda() (woo-write "/net-pppoe/" 'delete #t 'name (or (form-value "name") "")) (read-iface "")))) ;;; UI (edit visibility #f name "new_name") (gridbox columns "100" margin 10 (button text (_ "New connection...") align "left" name "new_button") (separator) (splitbox columns "30;70" (listbox name "name") (gridbox columns "0;100" ;; (label text (_ "Status:") align "right") (hbox align "left" (label name "info") (combobox name "status")) ;; (label text (_ "Interface:") align "right" name "iface") (combobox name "iface") ;; (label text (_ "Account:") align "right" name "login") (edit name "login") ;; (label text (_ "Password:") align "right" name "password") (edit echo "stars" name "password") ;; (spacer) (checkbox text (_ "MPPE encryption") name "mppe") ;; (label colspan 2) ;; (spacer) (hbox align "left" (button text (_ "Apply") name "apply_button") (button text (_ "Reset") name "reset_button") (label text " ") (button text (_ "Delete connection") name "del_button"))))) ;;; Logic (document:root (when loaded (form-bind "new_button" "click" new-iface) (form-bind "del_button" "click" delete-iface) (form-bind "apply_button" "click" write-iface) (form-bind "reset_button" "click" read-current-iface) (form-bind "name" "change" read-current-iface) (init-iface) (read-current-iface)))