From 9154cf219365944fe9b1423ac1622f2df4390849 Mon Sep 17 00:00:00 2001 From: Perry Mason Date: Fri, 6 Mar 2009 16:46:18 +0100 Subject: lo to Fit123 --- config/Fit123/bin/afc/reset_states.sh | 5 + config/Fit123/bin/code-red/all.css | 1178 +++++++++++++++++++++++++++++ config/Fit123/bin/date/index.abc | 275 +++++++ config/Fit123/bin/ltsp/services.inc | 1316 +++++++++++++++++++++++++++++++++ 4 files changed, 2774 insertions(+) create mode 100644 config/Fit123/bin/afc/reset_states.sh create mode 100644 config/Fit123/bin/code-red/all.css create mode 100644 config/Fit123/bin/date/index.abc create mode 100644 config/Fit123/bin/ltsp/services.inc (limited to 'config/Fit123') diff --git a/config/Fit123/bin/afc/reset_states.sh b/config/Fit123/bin/afc/reset_states.sh new file mode 100644 index 00000000..e0d0d48b --- /dev/null +++ b/config/Fit123/bin/afc/reset_states.sh @@ -0,0 +1,5 @@ +#!/bin/sh +sleep 60 +/sbin/pfctl -F state +sleep 40 +/sbin/pfctl -F state diff --git a/config/Fit123/bin/code-red/all.css b/config/Fit123/bin/code-red/all.css new file mode 100644 index 00000000..e813ff4d --- /dev/null +++ b/config/Fit123/bin/code-red/all.css @@ -0,0 +1,1178 @@ +/* Element CSS Definitions */ +html, body, td, th, input, select { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 0.9em; + +} + +div.GraphLink { + position: relative; +} + +span.GraphLinkLine { + position: absolute; + background-color: #990000; + width: 100%; +} + +/* DOM Tooltip CSS definitions */ +div.niceTitle +{ + background-color: #333333; + color: #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + width: 220px; + left: 0; + top: 0; + padding: 4px; + position: absolute; + text-align: left; + z-index: 20; + -moz-border-radius: 0 10px 10px 10px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=87); + -moz-opacity: .87; + -khtml-opacity: .87; + opacity: .87; +} +div.niceTitle h1 +{ + background: #990000; + border-bottom: 1px dotted #FFFFFF; + font-weight: bold; + font-size: 13px; + font-family: "Trebuchet MS", sans-serif; + margin: 3px; + padding-top: 1px; + padding-bottom: 1px; + padding-left: 3px; + text-align: left; + left: 0; + top: 0; + -moz-border-radius: 0 8px 0 0; + -moz-opacity: 1; +} +div.niceTitle .contents +{ + margin: 0; + padding: 0 3px; + filter: progid:DXImageTransform.Microsoft.Alpha(opacity=100); + -moz-opacity: 1; + -khtml-opacity: 1; + opacity: 1; +} +div.niceTitle p +{ + background: #FFFFFF; + border: 1px solid #990000; + color: #000000; + font-size: 11px; + font-family: "Trebuchet MS", sans-serif; + padding: 5px; + margin: 3px; + text-align: left; + -moz-opacity: 1; + -moz-border-radius: 0 0 8px 8px; +} + +body { + margin: 0px auto; + background: url('images/background.gif') no-repeat; + background-position : center 0px; + background-color: #4a0203; +} + +form { + margin: 0px; +} +a { + text-decoration: none; +} +form input { + font-size: 1.1em; +} + +iframe { + z-index: 1; + border: 1px dashed #990000; +} +.iframe { + background-color: #FFFFFF; +} + +/* ID Based CSS Definitions */ +#wrapper { + width: 810px; + margin: 0px auto; +} + +#header { + background: url('images/header.png') no-repeat; + background-position: 0px; + height: 102px; + width: 810px; + margin-bottom: 5px; + z-index: 2; +} +#header-left { + position: relative; + /* background: url('images/logo.gif') no-repeat; */ + background-position: center; + height: 65px; + width: 145px; + left: 10px; + float: left; +} +#header-left #status-link { + position: relative; + top: 10px; + left: 6px; +} +#header-right { + position: relative; + /* background: url('images/header.gif') no-repeat; */ + height: 70px; + color: #fff; + left: 0px; + margin-left: 165px; +} +#header-right .alert { + position: relative; + /* background: url('images/alert.gif') no-repeat; */ + background-position: 4px 2px; + color: #fff; + height: 17px; + width: 500px; + padding: 4px; + padding-left: 27px; + float: left; +} +#header-right .container { + position: relative; +} +#header-right .container .left { + position: relative; + float: left; + font-size: 1.3em; + font-weight: bold; + top: 15px; + left: 4px; + display: none; +} +#header-right .container .right { + position: relative; + float: right; + top: 22px; + padding-right: 4px; + z-index: 1; +} + +#header-right .container .right #alerts { + position: relative; + background: url('images/alert_bgr.png') no-repeat; + height: 39px; + width: 431px; + z-index: 1; + padding-top: 20px; + padding-left: 5px; + margin: 0px; +} +#header-right .container .right #hostname { + position: relative; + height: 39px; + width: 431px; + z-index: 1; + padding-left: 5px; + margin: 0px; + top: 25px; + left: 230px; + font-size: 14px; + color: #990000; + font-weight: bold; +} + + + +table#marquee { + position: relative; + top: -6px; + left: -5px; + border: 0; + padding: 0; + margin: 0; + width: 424px; + background-color: transparent; + padding: 2px; + border: 0px; +} +span#marquee-container { + position: absolute; + visibility: hidden; + top: -100px; + left: -10000px; +} +div#marquee-text { + font-size: 1.18em; + font-weight: normal; + font-family: Verdana; + color: #ffffff; +} +table#marquee div#container { + position: relative; + overflow: hidden; + width: 418px; + height: 20px; +} +table#marquee div#container div#scroller { + position: absolute; + left: 0px; + top: 0px; +} + + + + + +#content { + position: relative; + top: -5px; + left: 0px; + margin-top: 0px; + margin-left: 0px; + padding-top: 0px; + width: 810px; + background-color: #ffffff; +} + +#left { + width: 810px; + height: 1px; +} +#right { + position: relative; + top: -10px; + width: 770px; + margin-top: 0px; + margin-left: 5px; + margin-right: 5px; + padding-top: 5px; + padding-left: 10px; + padding-right: 10px; + padding-bottom: 20px; + min-height: 400px; +} + +#footer { + position: relative; + background: url('images/footer.png') no-repeat; + top: -18px; + left: 0px; + width: 810px; + height: 75px; + color: #999999; + text-align: center;; + font-size: 0.9em; + padding-top: 17px; + margin-bottom: 20px; + clear: both; +} +#footer p { + padding: 0px; + margin: 0px; +} + +/* Style the List */ +#navigation { + /* background: url('images/menu.gif') no-repeat; */ + /* width: 693px; */ + position: relative; + top: -35px; + left: 3px; + width: 810px; + padding: 0px; + height: 28px; + z-index: 3; +} +#navigation ul { + padding: 0; + margin: 0; + list-style: none; + text-align: center; +} +#navigation ul#menu { + padding-top: 3px; + padding-left: 5px; +} + +/* Style the List Elements */ +#navigation ul li { + float: left; + position: relative; + /* width: 7.5em; */ + width: 8.77em; +} +#navigation ul li div { + font-size: 1em; + font-weight: bold; +} +/* Make the List inside the List Elements */ +/* initially hidden with absolute position */ +#navigation ul li ul { + display: none; + position: absolute; + top: 2em; + left: -2px; + width: 9em; + font-weight: normal; + background: transparent bottom left no-repeat; /* This is key to making the menu maintain visibility when not on a link */ + /* background-color: #202020; + background: url("images/menu_footer.gif") no-repeat; + background-position: bottom; + */ + padding: 0em 0 0.4em 0; + padding-top: 0.3em; +} +/* to override top and left in browsers other than IE */ +/* which will position to the top right of the containing */ +/* li, rather than bottom left */ +#navigation ul li > ul { + top: auto; + left: auto; + left: -1px !important; +} +/* Show initial drop down upon mouse over, but do not show */ +/* nested side drop menus within listed elements */ +#navigation ul li:hover ul { + display: block; + cursor: pointer; +} +#navigation ul li:hover { + cursor: pointer; + cursor: pointer; +} +#navigation ul li:hover div { + text-decoration: none; +} + +#navigation ul li { + background-color: transparent; + color: #FFF; +} +#navigation ul li ul li { + border: 1px solid #990000; + width: 8.8em; + height: 1.6em; + line-height: 1.6em; + background-color: #990000; + color: #FFF; +} +#navigation ul li ul li:hover { + background-color: #666666; +} + +#navigation li li a { + display: block; + padding-left: 10px; + padding-right: 10px; +} + +#navigation ul li ul li a.navlnk:hover { + text-decoration: none; +} +#navigation ul li.first { + border-right: 0px; +} +#navigation ul li.middle { + border-right: 0px; +} +#navigation ul li.last { + +} + +#navigation ul li.dropfirst { + border-bottom: 0px; +} +#navigation ul li.dropmiddle { + border-bottom: 0px; +} +#navigation ul li.droplast { +} + +#wzdtabcont { + float: left; + background-color: #FFFFFF; + color: #000000; + padding: 0; +} + +ul#wzdnav { + font-size: 0.96em; + float: left; + width: 14.5em; + margin: 0; + padding-left: 18px; +} + +ul#wzdnav li { + list-style: none; + margin: 0; + padding-bottom: 0.2em; + padding-left: 0; +} + +ul#wzdnav a { + display: block; + padding: 0.3em; + font-weight: normal; +} + +#wzdnavbold a { + display: block; + padding: 0.3em; + font-weight: bold ! important; +} + +ul#wzdnav a:link { + color: black; + background-color: #eee; +} + +ul#wzdnav a:visited { + color: #666; + background-color: #eee; +} + +ul#wzdnav a:hover { + color: black; + background-color: white; +} + +ul#wzdnav a:active { + color: white; + background-color: gray; +} + +#graph { + position: relative; + z-index: 10; +} + +#logoutbtn { + position: absolute; + left: 95%; + vertical-align: middle; +} + + +#graph { + position: relative; + z-index: 10; +} + + + +/* Class Based CSS Definitions */ +.pgtitle { + font-size: 18px; + color: #777777; + font-weight: bold; +} +.tfrtitle { + font-size: 18px; + color: #ffffff; + font-weight: bold; +} +.vncell { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + border-bottom: 1px solid #999999; +} +.formfld { + font-size: small; +} +.formselect { + font-size: 1.0em; +} +.langopt { + padding-left: 34px; + padding-top: 2px; + padding-bottom: 2px; +} +.saved { + /* background: url('/themes/nione/images/icons/icon_wzd_saved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_saved.png') ! important; +} +.notsaved { + /* background: url('/themes/nione/images/icons/icon_wzd_nsaved.png') no-repeat 0 1px #FFFFFF; */ + list-style-image: url('/themes/nervecenter/images/icons/icon_wzd_nsaved.png') ! important; +} +.en { + background: url('/themes/nervecenter/images/icons/icon_flag_en.png') no-repeat 0 1px #FFFFFF; +} +.de { + background: url('/themes/nervecenter/images/icons/icon_flag_de.png') no-repeat 0 1px #FFFFFF; +} +.es { + background: url('/themes/nervecenter/images/icons/icon_flag_es.png') no-repeat 0 1px #FFFFFF; +} +.pt_BR { + background: url('/themes/nervecenter/images/icons/icon_flag_pt_BR.png') no-repeat 0 1px #FFFFFF; +} +.host { + background: url('/themes/nervecenter/images/icons/icon_frmfld_host.png') no-repeat 0 1px #FFFFFF; +} +.search { + background: url('/themes/nervecenter/images/icons/icon_frmfld_search.png') no-repeat 0 1px #FFFFFF; +} +.file { + background: url('/themes/nervecenter/images/icons/icon_frmfld_file.png') no-repeat 0 1px #FFFFFF; +} +.mail { + background: url('/themes/nervecenter/images/icons/icon_frmfld_mail.png') no-repeat 0 1px #FFFFFF; +} +.imp { + background: url('/themes/nervecenter/images/icons/icon_frmfld_imp.png') no-repeat 0 1px #FFFFFF; +} +.pwd { + background: url('/themes/nervecenter/images/icons/icon_frmfld_pwd.png') no-repeat 0 1px #FFFFFF; +} +.user { + background: url('/themes/nervecenter/images/icons/icon_frmfld_user.png') no-repeat 0 1px #FFFFFF ; +} +.group { + background: url('/themes/nervecenter/images/icons/icon_frmfld_group.png') no-repeat 0 1px #FFFFFF; +} +.url { + background: url('/themes/nervecenter/images/icons/icon_frmfld_url.png') no-repeat 0 1px #FFFFFF; +} +.time { + background: url('/themes/nervecenter/images/icons/icon_frmfld_time.png') no-repeat 0 1px #FFFFFF; +} +.unknown { + background: url('/themes/nervecenter/images/icons/icon_frmfld_unknown.png') no-repeat 0 1px #FFFFFF; +} +.formfld_cert { + background: url('/themes/nervecenter/images/icons/icon_frmfld_cert.png') no-repeat 0 1px #FFFFFF; + padding-left: 28px; + font-family: Courier New, Courier, monospaced; + font-size: 11px; +} +.formfldalias { + background-color: #990000; + color: #FFFFFF; +} +.formpre { + font-family: Courier New, Courier, monospaced; + font-size: 10px; +} +.formbtn { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 13px; + font-weight: bold; +} +.formbtns { + font-family: Tahoma, Verdana, Arial, Helvetica, sans-serif; + font-size: 10px; + font-weight: bold; +} +.vvcell { + background-color: #FFFFC6; +} +.errmsg { + font-weight: bold; + color: #CC0000; +} +.red { + color: #CC0000; +} +.gray { + color: #A0A0A0; +} +.vexpl { + font-size: 11px; +} +.navlnk { + color: #FFFFFF; + text-decoration: none; + font-size: 13px; +} +.navlnks { + color: #FFFFFF; + text-decoration: none; + font-size: 11px; +} +.redlnk { + color: #990000; + text-decoration: none; +} +.tblnk { + color: #999999; + text-decoration: none; +} +.vncellreq { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vncellt { + background-color: #DDDDDD; + padding-right: 20px; + padding-left: 8px; + padding-top: 4px; + padding-bottom: 4px; + font-weight: bold; + border-bottom: 1px solid #999999; +} +.vtable { + border-bottom: 1px solid #999999; +} +.vnsepcell { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.cpline { + font-size: 11px; + color: #FFFFFF; +} +.hostname { + font-size: 11px; + color: #990000; + font-weight: bold; +} +.vnsepcellr { + background-color: #BBBBBB; + padding-right: 20px; + padding-left: 8px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listrpad { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-right: 16px; + padding-left: 10px; + padding-top: 8px; + padding-bottom: 8px; +} +.listn { + font-size: 11px; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbg { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #990000; + color: #FFFFFF; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listbggrey { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 16px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listhdr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdr a { + color: #000000; +} +.listhdrr { + background-color: #BBBBBB; + padding-right: 16px; + padding-left: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + padding-top: 5px; + padding-bottom: 5px; +} +.listhdrr a { + color: #000000; +} +.listlr { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-right: 6px; + padding-left: 6px; + padding-top: 4px; + padding-bottom: 4px; +} +.listlrns { + background-color: #FFFFFF; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + border-left: 1px solid #999999; + font-size: 11px; + padding-top: 4px; + padding-bottom: 4px; +} +.list { + font-size: 11px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.listt { + font-size: 11px; + padding-top: 5px; +} +.listhdrrns { + background-color: #BBBBBB; + padding-left: 6px; + padding-top: 5px; + padding-bottom: 5px; + padding-right: 6px; + font-weight: bold; + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; +} +.listbgns { + border-right: 1px solid #999999; + border-bottom: 1px solid #999999; + font-size: 11px; + background-color: #D9DEE8; + padding-left: 6px; + padding-right: 4px; + padding-top: 4px; + padding-bottom: 4px; +} +.listtopic { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 16px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.optsect_t { + border-right: 1px solid #999999; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + padding-top: 2px; + padding-bottom: 2px; +} +.optsect_s { + font-size: 11px; + color: #FFFFFF; + font-weight: bold; +} +.tabnavtbl { +} + + +/* MISC CSS Definitions */ +ul#tabnav { + font-size: 11px; + font-weight: bold; + list-style-type: none; + margin: 0; + padding: 0; +} +ul#tabnav li.tabinact1 { + float: left; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact { + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +ul#tabnav li.tabinact a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabinact1 a { + float: left; + display: block; + text-decoration: none; + padding: 5px 8px 5px 8px; + color: #FFFFFF; +} +ul#tabnav li.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabcont { + background-color: #EEEEEE; + padding-right: 12px; + padding-left: 12px; + padding-top: 12px; + padding-bottom: 12px; +} +.tabact { + float: left; + background-color: #EEEEEE; + color: #000000; + padding: 5px 8px 5px 8px; + white-space: nowrap; +} +.tabinact { + font-weight: bold; + float: left; + border-left: 1px solid #999999; + background-color: #777777; + color: #FFFFFF; + padding: 0; + white-space: nowrap; +} +.menu { + background-color: #000000; + white-space: nowrap; + padding: 0px 5px 0px 5px; + width: 100%; + vertical-align: top; +} + + +/* Auto Complete Suggestions */ +div.suggestions { + -moz-box-sizing: border-box; + /* box-sizing: border-box; */ + border: 1px solid black; + position: absolute; + background-color: #990000; + color: #FFF; +} + +div.suggestions div { + cursor: default; + padding: 0px 3px; + background-color: #990000; + color: #FFF; +} + +div.suggestions div.current { + background-color: #3366cc; + color: #FFF; +} +/* End Auto Complete Suggestions */ + + +/* Nifty Corners Crap */ +.rtop,.artop{display:block} +.rtop *,.artop *{display:block;height:1px;overflow:hidden;font-size:1px} +.artop *{border-style: solid;border-width:0 1px} +.r1,.rl1,.re1,.rel1{margin-left:5px} +.r1,.rr1,.re1,.rer1{margin-right:5px} +.r2,.rl2,.re2,.rel2,.ra1,.ral1{margin-left:3px} +.r2,.rr2,.re2,.rer2,.ra1,.rar1{margin-right:3px} +.r3,.rl3,.re3,.rel3,.ra2,.ral2,.rs1,.rsl1,.res1,.resl1{margin-left:2px} +.r3,.rr3,.re3,.rer3,.ra2,.rar2,.rs1,.rsr1,.res1,.resr1{margin-right:2px} +.r4,.rl4,.rs2,.rsl2,.re4,.rel4,.ra3,.ral3,.ras1,.rasl1,.res2,.resl2{margin-left:1px} +.r4,.rr4,.rs2,.rsr2,.re4,.rer4,.ra3,.rar3,.ras1,.rasr1,.res2,.resr2{margin-right:1px} +.rx1,.rxl1{border-left-width:5px} +.rx1,.rxr1{border-right-width:5px} +.rx2,.rxl2{border-left-width:3px} +.rx2,.rxr2{border-right-width:3px} +.re2,.rel2,.ra1,.ral1,.rx3,.rxl3,.rxs1,.rxsl1{border-left-width:2px} +.re2,.rer2,.ra1,.rar1,.rx3,.rxr3,.rxs1,.rxsr1{border-right-width:2px} +.rxl1,.rxl2,.rxl3,.rxl4,.rxsl1,.rxsl2,.ral1,.ral2,.ral3,.ral4,.rasl1,.rasl2{border-right-width:0} +.rxr1,.rxr2,.rxr3,.rxr4,.rxsr1,.rxsr2,.rar1,.rar2,.rar3,.rar4,.rasr1,.rasr2{border-left-width:0} +.r4,.rl4,.rr4,.re4,.rel4,.rer4,.ra4,.rar4,.ral4,.rx4,.rxl4,.rxr4{height:2px} +.rer1,.rel1,.re1,.res1,.resl1,.resr1{border-width:1px 0 0;height:0px !important;height /**/:1px} +/* End Nifty Corners Crap */ + +/* Widget CSS */ +.widgetsubheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #999999; + padding-right: 6px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetdiv{ + margin:5px; + padding: 5px; + background:#CCCCCC; +} + +/* CSS for Dynamic Log Viewer */ +/* Author: Erik Kristensen */ +div#log div.log-entry { + clear: both; +} + +div#log div.log-entry span, +div#log div.log-header span { + padding: 3px 2px 3px 2px; + padding-left: 8px; +} + +div#log div.log-entry span.log-action { + padding-bottom: 6px; + padding-left: 5px; + padding-right: 5px; +} + +div#log div.log-header span { + border-top: 1px solid #999; + background-color: #bbb; + font-weight: bold; + text-align: left; +} + +div#log span.log-action, +div#log span.log-time, +div#log span.log-interface, +div#log span.log-source, +div#log span.log-destination, +div#log span.log-protocol { + float: left; + text-align: left; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-general { + +} + +div#log span.log-protocol { + border-right: 1px solid #999; +} + +div#log span.log-action { + width: 2em; + text-align: center; +} + +div#log span.log-time { + width: 12.5em; +} + +div#log span.log-interface { + width: 5em; +} + +div#log span.log-source, +div#log span.log-destination { + width: 17.6em; +} + +div#log span.log-protocol { + width: 5.5em; +} +/* END CSS FOR DYNAMIC LOG VIEWER */ + +#login { + background: #cccccc; + border: 0px solid #666666; + margin: 5em auto; + padding: 0em; + width: 340px; +} + +#login h1 { + background: url(images/misc/logon.png) no-repeat top left; + margin-top: 0; + display: block; + text-indent: -1000px; + height: 50px; + border-bottom: none; +} + +#login p { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login span { + font-size: 1em; + font-weight: bold; + width: 20%; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login p#text { + font-size: 1em; + font-weight: normal; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +#login #submit { + font-size: 1em; + font-weight: bold; + padding: 3px; + margin: 0em; + text-indent: 10px; +} + +/* Widget CSS */ +.widgetsubheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #B1B1B1; + padding-right: 6px; + padding-left: 6px; + color: #000000; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetheader { + border-right: 1px solid #999999; + font-size: 11px; + background-color: #990000; + padding-right: 6px; + padding-left: 6px; + color: #FFFFFF; + font-weight: bold; + padding-top: 5px; + padding-bottom: 5px; +} +.widgetdiv{ + margin:5px; + padding: 5px; + background:#CCCCCC; +} +.widgetconfigdiv{ + background:#BBBBBB; + font-size: 11px; + color: #000000; + padding-right: 5px; + padding-left: 5px; + padding-top: 5px; + padding-bottom: 5px; +} + +div#log div.log-entry-mini { + clear: both; +} + +div#log div.log-entry-mini span { + padding: 2px 2px 2px 2px; + padding-left: 8px; +} + +div#log span.log-action-mini-header, +div#log span.log-interface-mini-header, +div#log span.log-source-mini-header, +div#log span.log-destination-mini-header, +div#log span.log-protocol-mini-header { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 12px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-time-mini, +div#log span.log-interface-mini, +div#log span.log-source-mini, +div#log span.log-destination-mini, +div#log span.log-protocol-mini { + float: left; + text-align: left; + background-color: #FFFFFF; + font-size: 11px; + border-left: 1px solid #999; + border-bottom: 1px solid #999; +} + +div#log span.log-action-mini, +div#log span.log-action-mini-header { + width: 6%; +} + +div#log span.log-interface-mini, +div#log span.log-interface-mini-header { + width: 8%; +} + +div#log span.log-source-mini, +div#log span.log-destination-mini, +div#log span.log-source-mini-header, +div#log span.log-destination-mini-header { + width: 31%; +} + +div#log span.log-protocol-mini, +div#log span.log-protocol-mini-header { + width: 8%; + border-right: 1px solid #999; +} diff --git a/config/Fit123/bin/date/index.abc b/config/Fit123/bin/date/index.abc new file mode 100644 index 00000000..73a81fa1 --- /dev/null +++ b/config/Fit123/bin/date/index.abc @@ -0,0 +1,275 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + oR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + + ## Load Essential Includes + require_once('guiconfig.inc'); + require_once('notices.inc'); + + + ## Load Functions Files + require_once('includes/functions.inc.php'); + + + ## Load AJAX, Initiate Class ############################################### + require_once('includes/sajax.class.php'); + + ## Initiate Class and Set location of ajax file containing + ## the information that we need for this page. Also set functions + ## that SAJAX will be using. + $oSajax = new sajax(); + $oSajax->sajax_remote_uri = 'sajax/index.sajax.php'; + $oSajax->sajax_request_type = 'POST'; + $oSajax->sajax_export("get_stats"); + $oSajax->sajax_handle_client_request(); + ############################################################################ + + + ## Check to see if we have a swap space, + ## if true, display, if false, hide it ... + if(file_exists("/usr/sbin/swapinfo")) { + $swapinfo = `/usr/sbin/swapinfo`; + if(stristr($swapinfo,'%') == true) $showswap=true; + } + + + ## User recently restored his config. + ## If packages are installed lets resync + if(file_exists('/conf/needs_package_sync')) { + if($config['installedpackages'] <> '') { + conf_mount_rw(); + unlink('/conf/needs_package_sync'); + header('Location: pkg_mgr_install.php?mode=reinstallall'); + exit; + } + } + + + ## If it is the first time webGUI has been + ## accessed since initial install show this stuff. + if(file_exists('/conf/trigger_initial_wizard')) { + + echo << + + + {$g['product_name']}.local - {$g['product_name']} first time setup + + + + + +EOF; + echo "\n"; + + if(file_exists("/usr/local/www/themes/{$g['theme']}/wizard.css")) + echo "\n"; + else + echo ""; + + echo "
\n"; + echo "
\n"; + echo "

\n"; + echo "

\n"; + echo "Welcome to {$g['product_name']}!

\n"; + echo "One moment while we start the initial setup wizard.

\n"; + echo "Embedded platform users: Please be patient, the wizard takes a little longer to run than the normal GUI.

\n"; + echo "To bypass the wizard, click on the {$g['product_name']} logo on the initial page.\n"; + echo "

\n"; + echo "\n"; + echo "\n"; + exit; + } + + + ## Find out whether there's hardware encryption or not + unset($hwcrypto); + $fd = @fopen("{$g['varlog_path']}/dmesg.boot", "r"); + if ($fd) { + while (!feof($fd)) { + $dmesgl = fgets($fd); + if (preg_match("/^hifn.: (.*?),/", $dmesgl, $matches)) { + $hwcrypto = $matches[1]; + break; + } + } + fclose($fd); + } + + + ## Set Page Title and Include Header + $pgtitle = "{$g['product_name']} webGUI"; + include("head.inc"); + +?> + + + +

"; +?> + +

System Overview

+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
System information
Name
Version + +
+ built on +
Platform / Current Date /
Hardware crypto
Uptime
Last config change
State table size + +
+ Show states +
MBUF Usage + + / +
CPU usage + + left barred bargray barright bar +   + +
Memory usage + + left barred bargray barright bar +   + +
SWAP usage + + left barred bargray barright bar +   + +
Temperature + + /images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" />/images/misc/bar_blue.gif" height="15" name="tempwidtha" id="tempwidtha" width="" border="0" align="middle" alt="red bar" />/images/misc/bar_gray.gif" height="15" name="tempwidthb" id="tempwidthb" width="" border="0" align="middle" alt="gray bar" />/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> +   + " /> +
Disk usage + + /images/misc/bar_left.gif" height="15" width="4" border="0" align="middle" alt="left bar" />/images/misc/bar_blue.gif" height="15" width="" border="0" align="middle" alt="red bar" />/images/misc/bar_gray.gif" height="15" width="" border="0" align="middle" alt="gray bar" />/images/misc/bar_right.gif" height="15" width="5" border="0" align="middle" alt="right bar" /> +   + +
+ +
+ + + + + + + diff --git a/config/Fit123/bin/ltsp/services.inc b/config/Fit123/bin/ltsp/services.inc new file mode 100644 index 00000000..a788a2b3 --- /dev/null +++ b/config/Fit123/bin/ltsp/services.inc @@ -0,0 +1,1316 @@ +. + All rights reserved. + + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + + THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, + INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY + AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE + AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, + OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + POSSIBILITY OF SUCH DAMAGE. +*/ + +/* include all configuration functions */ +require_once("functions.inc"); + +function load_balancer_use_sticky() { + global $config, $g; + if (isset ($config['system']['lb_use_sticky'])) + touch("/var/etc/use_pf_pool__stickyaddr"); + else + unlink_if_exists("/var/etc/use_pf_pool__stickyaddr"); +} + +function services_dhcpd_configure() { + global $config, $g; + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "services_dhcpd_configure($if) being called $mt\n"; + } + + /* if OLSRD is enabled, allow WAN to house DHCP. */ + if($config['installedpackages']['olsrd']) + foreach($config['installedpackages']['olsrd']['config'] as $olsrd) + if($olsrd['enable']) + $is_olsr_enabled = true; + + /* configure DHCPD chroot */ + $fd = fopen("/tmp/dhcpd.sh","w"); + $status = `mount | grep "{$g['dhcpd_chroot_path']}/dev"`; + fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}\n"); + fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/dev\n"); + fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/etc\n"); + fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/usr/local/sbin\n"); + fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/var/db\n"); + fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/usr\n"); + fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/lib\n"); + fwrite($fd, "mkdir -p {$g['dhcpd_chroot_path']}/run\n"); + fwrite($fd, "chown -R dhcpd:_dhcp {$g['dhcpd_chroot_path']}/*\n"); + fwrite($fd, "cp /lib/libc.so.* {$g['dhcpd_chroot_path']}/lib/\n"); + fwrite($fd, "cp /usr/local/sbin/dhcpd {$g['dhcpd_chroot_path']}/usr/local/sbin/\n"); + fwrite($fd, "chmod a+rx {$g['dhcpd_chroot_path']}/usr/local/sbin/dhcpd\n"); + if(!trim($status)) + fwrite($fd, "mount -t devfs devfs {$g['dhcpd_chroot_path']}/dev\n"); + fclose($fd); + mwexec("/bin/sh /tmp/dhcpd.sh"); + + /* kill any running dhcpd */ + if(is_process_running("dhcpd")) + mwexec("killall dhcpd", true); + + $syscfg = $config['system']; + $dhcpdcfg = $config['dhcpd']; + + /* DHCP enabled on any interfaces? */ + $dhcpdenable = false; + if(is_array($dhcpdcfg)) + foreach ($dhcpdcfg as $dhcpif => $dhcpifconf) { + if (isset($dhcpifconf['enable']) && + (($dhcpif == "lan") || + (isset($config['interfaces'][$dhcpif]['enable']) && + $config['interfaces'][$dhcpif]['if'] && (!$config['interfaces'][$dhcpif]['bridge'])))) + $dhcpdenable = true; + if (isset($dhcpifconf['enable']) && + (($dhcpif == "wan") || (isset($config['interfaces'][$dhcpif]['enable']) && + $config['interfaces'][$dhcpif]['if'] && (!$config['interfaces'][$dhcpif]['bridge'])))) + $dhcpdenable = true; + } + + if (!$dhcpdenable) + return 0; + + if ($g['booting']) + echo "Starting DHCP service..."; + else + sleep(1); + + /* write dhcpd.conf */ + $fd = fopen("{$g['dhcpd_chroot_path']}/etc/dhcpd.conf", "w"); + if (!$fd) { + printf("Error: cannot open dhcpd.conf in services_dhcpd_configure().\n"); + return 1; + } + + + + $dhcpdconf = << $dhcpifconf) { + if($dhcpifconf['failover_peerip'] <> "") { + /* + * yep, failover peer is defined. + * does it match up to a defined vip? + */ + $skew = 110; + $a_vip = &$config['virtualip']['vip']; + if(is_array($a_vip)) { + foreach ($a_vip as $vipent) { + $int = guess_interface_from_ip($dhcpifconf['failover_peerip']); + $intip = find_interface_ip($int); + $real_dhcpif = convert_friendly_interface_to_real_interface_name($dhcpif); + if($int == $real_dhcpif) { + /* this is the interface! */ + if($vipent['advskew'] < "20") + $skew = 0; + } + } + } else { + log_error("Warning! DHCP Failover setup and no CARP virtual IP's defined!"); + } + if($skew > 10) { + $type = "secondary"; + $dhcpdconf_pri = "mclt 600;\n"; + $my_port = "520"; + $peer_port = "519"; + } else { + $my_port = "519"; + $peer_port = "520"; + $type = "primary"; + $dhcpdconf_pri = "split 128;\n"; + $dhcpdconf_pri .= " mclt 600;\n"; + } + $dhcpdconf .= << $dhcpifconf) { + + $ifcfg = $config['interfaces'][$dhcpif]; + + if (!isset($dhcpifconf['enable']) || + ($ifcfg['ipaddr'] == "dhcp") || + (($dhcpif != "lan") && + (!isset($ifcfg['enable']) || !$ifcfg['if'] || $ifcfg['bridge']))) + continue; + + if($dhcpif == "lan" && $ifcfg['bridge']) + log_error("NOTE: DHCP Server on LAN is enabled."); + + $subnet = gen_subnet($ifcfg['ipaddr'], $ifcfg['subnet']); + $subnetmask = gen_subnet_mask($ifcfg['subnet']); + + if($is_olsr_enabled == true) + if($dhcpifconf['netmask']) + $subnetmask = gen_subnet_mask($dhcpifconf['netmask']); + + $dnscfg = ""; + + if ($dhcpifconf['domain']) { + $dnscfg .= " option domain-name \"{$dhcpifconf['domain']}\";\n"; + } + if (isset($dhcpifconf['ddnsupdate'])) { + if($dhcpifconf['ddnsdomain'] <> "") { + $dnscfg .= " ddns-domainname \"{$dhcpifconf['ddnsdomain']}\";\n"; + } + $dnscfg .= " ddns-update-style interim;\n"; + } + + + if (is_array($dhcpifconf['dnsserver']) && ($dhcpifconf['dnsserver'][0])) { + $dnscfg .= " option domain-name-servers " . join(",", $dhcpifconf['dnsserver']) . ";"; + } else if (isset($config['dnsmasq']['enable'])) { + $dnscfg .= " option domain-name-servers " . $ifcfg['ipaddr'] . ";"; + } else if (is_array($syscfg['dnsserver']) && ($syscfg['dnsserver'][0])) { + $dnscfg .= " option domain-name-servers " . join(",", $syscfg['dnsserver']) . ";"; + } + + $dhcpdconf .= "subnet $subnet netmask $subnetmask {\n"; + $dhcpdconf .= " pool {\n"; + + /* is failover dns setup? */ + if (is_array($dhcpifconf['dnsserver']) && $dhcpifconf['dnsserver'][0] <> "") { + $dhcpdconf .= " option domain-name-servers {$dhcpifconf['dnsserver'][0]}"; + if($dhcpifconf['dnsserver'][1] <> "") + $dhcpdconf .= ",{$dhcpifconf['dnsserver'][1]}"; + $dhcpdconf .= ";\n"; + } + + if($dhcpifconf['failover_peerip'] <> "") + $dhcpdconf .= " deny dynamic bootp clients;\n"; + + if (isset($dhcpifconf['denyunknown'])) + $dhcpdconf .= " deny unknown clients;\n"; + + if ($dhcpifconf['gateway']) + $routers = $dhcpifconf['gateway']; + else + $routers = $ifcfg['ipaddr']; + + if($dhcpifconf['failover_peerip'] <> "") { + $dhcpdconf .= " failover peer \"dhcp{$dhcpnum}\";\n"; + $dhcpnum++; + } + + $dhcpdconf .= << "") && ($dhcpifconf['filename'] <> "")) { + $dhcpdconf .= " next-server {$dhcpifconf['next-server']};\n"; + $dhcpdconf .= " filename \"{$dhcpifconf['filename']}\";\n"; + } + if ($dhcpifconf['rootpath'] <> "") { + $dhcpdconf .= " option root-path \"{$dhcpifconf['rootpath']}\";\n"; + } + } + $dhcpdconf .= << /dev/null 2>&1 "); + if (is_array($config['dhcpd'][$if]['staticmap'])) { + + foreach ($config['dhcpd'][$if]['staticmap'] as $arpent) { + mwexec("/usr/sbin/arp -s " . escapeshellarg($arpent['ipaddr']) . " " . escapeshellarg($arpent['mac'])); + log_error("/usr/sbin/arp -s " . escapeshellarg($arpent['ipaddr']) . " " . escapeshellarg($arpent['mac'])); + } + + } + } else { + mwexec("/sbin/ifconfig " . escapeshellarg($ifcfg['if']) . " -staticarp " ); + mwexec("/usr/sbin/arp -da > /dev/null 2>&1 "); + } + + return 0; +} + +function services_dhcrelay_configure() { + global $config, $g; + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "services_dhcrelay_configure() being called $mt\n"; + } + + /* kill any running dhcrelay */ + killbypid("{$g['varrun_path']}/dhcrelay.pid"); + + $dhcrelaycfg = $config['dhcrelay']; + + /* DHCPRelay enabled on any interfaces? */ + $dhcrelayenable = false; + if(is_array($dhcrelaycfg)) { + foreach ($dhcrelaycfg as $dhcrelayif => $dhcrelayifconf) { + if (isset($dhcrelayifconf['enable']) && + (($dhcrelayif == "lan") || + (isset($config['interfaces'][$dhcrelayif]['enable']) && + $config['interfaces'][$dhcrelayif]['if'] && (!$config['interfaces'][$dhcrelayif]['bridge'])))) + $dhcrelayenable = true; + } + } + + if (!$dhcrelayenable) + return 0; + + if ($g['booting']) + echo "Starting DHCP relay service..."; + else + sleep(1); + + $dhcrelayifs = array(); + foreach ($dhcrelaycfg as $dhcrelayif => $dhcrelayifconf) { + + $ifcfg = $config['interfaces'][$dhcrelayif]; + + if (!isset($dhcrelayifconf['enable']) || + (($dhcrelayif != "lan") && + (!isset($ifcfg['enable']) || !$ifcfg['if'] || $ifcfg['bridge']))) + continue; + + $dhcrelayifs[] = $ifcfg['if']; + } + + /* In order for the relay to work, it needs to be active on the + interface in which the destination server sits */ + foreach ($config['interfaces'] as $ifname) { + $subnet = $ifname['ipaddr'] . "/" . $ifname['subnet']; + if (ip_in_subnet($dhcrelaycfg['server'],$subnet)) + $destif = $ifname['if']; + } + + if (!isset($destif)) + $destif = $config['interfaces']['wan']['if']; + + $dhcrelayifs[] = $destif; + $dhcrelayifs = array_unique($dhcrelayifs); + + /* fire up dhcrelay */ + $cmd = "/usr/local/sbin/dhcrelay -i " . join(" -i ", $dhcrelayifs); + + if (isset($dhcrelaycfg['agentoption'])) + $cmd .= " -a -m replace"; + + $cmd .= " {$dhcrelaycfg['server']}"; + mwexec($cmd); + + if (!$g['booting']) { + /* set the reload filter dity flag */ + touch("{$g['tmp_path']}/filter_dirty"); + } + + return 0; +} + +function services_dyndns_reset() { + global $config, $g; + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "services_dyndns_reset() being called $mt\n"; + } + + if (file_exists("{$g['vardb_path']}/ez-ipupdate.cache")) { + conf_mount_rw(); + unlink("{$g['vardb_path']}/ez-ipupdate.cache"); + conf_mount_ro(); + } + + if (file_exists("{$g['conf_path']}/ez-ipupdate.cache")) { + conf_mount_rw(); + unlink("{$g['conf_path']}/ez-ipupdate.cache"); + conf_mount_ro(); + } + + if (file_exists("{$g['conf_path']}/dyndns.cache")) { + conf_mount_rw(); + unlink("{$g['conf_path']}/dyndns.cache"); + conf_mount_ro(); + } + + return 0; +} + +function services_dyndns_configure() { + global $config, $g; + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "services_dyndns_configure() being called $mt\n"; + } + + $dyndnscfg = $config['dyndns']; + $wancfg = $config['interfaces']['wan']; + + if (isset($dyndnscfg['enable'])) { + + if ($g['booting']) { + echo "Starting DynDNS client..."; + if(isset($config['system']['use_old_dyndns'])) { + echo " [Using ez-ipupdate] "; + services_dyndns_configure_old(); + return; + } + } else { + sleep(1); + if(isset($config['system']['use_old_dyndns'])) { + services_dyndns_configure_old(); + return; + } + } + + /* load up the dyndns.class */ + require_once("dyndns.class"); + + log_error("DynDns: Running updatedns()"); + + /* determine WAN interface name */ + $wanif = get_real_wan_interface(); + /* get ip */ + $ip = find_interface_ip($wanif); + + $dns = new updatedns($dnsService = $config['dyndns']['type'], + $dnsHost = $config['dyndns']['host'], + $dnsUser = $config['dyndns']['username'], + $dnsPass = $config['dyndns']['password'], + $dnsWilcard = $config['dyndns']['wildcard'], + $dnsMX = $config['dyndns']['mx']); + + if ($g['booting']) + echo "done.\n"; + } + + return 0; +} + +function services_dyndns_configure_old() { + global $config, $g; + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "services_dyndns_configure_old() being called $mt\n"; + } + + /* kill any running ez-ipupdate */ + /* ez-ipupdate needs SIGQUIT instead of SIGTERM */ + sigkillbypid("{$g['varrun_path']}/ez-ipupdate.pid", "QUIT"); + + $dyndnscfg = $config['dyndns']; + $wancfg = $config['interfaces']['wan']; + + if (isset($dyndnscfg['enable'])) { + + if ($g['booting']) + echo "Starting DynDNS client..."; + else + sleep(1); + + /* determine WAN interface name */ + $wanif = get_real_wan_interface(); + + /* write ez-ipupdate.conf */ + $fd = fopen("{$g['varetc_path']}/ez-ipupdate.conf", "w"); + if (!$fd) { + printf("Error: cannot open ez-ipupdate.conf in services_dyndns_configure().\n"); + return 1; + } + + $ezipupdateconf = << $paents) { + if ($paif == "wan" && !(is_ipaddr($config['interfaces']['wan']['ipaddr']) || + ($config['interfaces']['wan']['ipaddr'] == "dhcp") || + ($config['interfaces']['wan']['ipaddr'] == "bigpond"))) + continue; + + $args = $config['interfaces'][$paif]['if'] . " auto"; + + foreach ($paents as $paent) { + + if (isset($paent['subnet'])) + $args .= " " . escapeshellarg("{$paent['subnet']}/{$paent['subnet_bits']}"); + else if (isset($paent['range'])) + $args .= " " . escapeshellarg($paent['range']['from'] . "-" . + $paent['range']['to']); + } + + mwexec_bg("/usr/local/sbin/choparp " . $args); + } + } +} + +function services_dnsupdate_process() { + global $config, $g; + if(isset($config['system']['developerspew'])) { + $mt = microtime(); + echo "services_dnsupdate_process() being called $mt\n"; + } + + /* Dynamic DNS updating active? */ + if (isset($config['dnsupdate']['enable'])) { + + $wanip = get_current_wan_address(); + if ($wanip) { + + $keyname = $config['dnsupdate']['keyname']; + /* trailing dot */ + if (substr($keyname, -1) != ".") + $keyname .= "."; + + $hostname = $config['dnsupdate']['host']; + /* trailing dot */ + if (substr($hostname, -1) != ".") + $hostname .= "."; + + /* write private key file + this is dumb - public and private keys are the same for HMAC-MD5, + but nsupdate insists on having both */ + $fd = fopen("{$g['varetc_path']}/K{$keyname}+157+00000.private", "w"); + $privkey .= << "on") + return; + $fd = fopen("{$g['varetc_path']}/olsr.conf", "w"); + + if($olsrd['announcedynamicroute'] or $olsrd['enableannounce'] == "on") { + $enableannounce .= "\nHna4\n"; + $enableannounce .= "{\n"; + if($olsrd['announcedynamicroute']) + $enableannounce .= "\t{$olsrd['announcedynamicroute']}\n"; + if($olsrd['enableannounce'] == "on") + $enableannounce .= "0.0.0.0 0.0.0.0"; + $enableannounce .= "\n}\n"; + } else { + $enableannounce = ""; + } + + $olsr .= <<0 +# +# defaults to 1 + +MprCoverage 3 + +# Example plugin entry with parameters: + +EODA; + +if($olsrd['enablehttpinfo'] == "on") { + $olsr .= << 0) + mwexec('killall miniupnpd 2>/dev/null', true); + mwexec('/sbin/pfctl -aminiupnpd -Fr 2>&1 >/dev/null'); + mwexec('/sbin/pfctl -aminiupnpd -Fn 2>&1 >/dev/null'); + break; + case "restart": + upnp_action('stop'); + upnp_action('start'); + break; + } +} + +function upnp_start() { + global $config, $g; + if($config['installedpackages']['miniupnpd']['config'][0]['enable']) { + if($g['booting']) { + echo "Starting UPnP service..."; + include('/usr/local/pkg/miniupnpd.inc'); + sync_package_miniupnpd(); + echo "done.\n"; + } + else { + upnp_action('start'); + } + } +} + +?> -- cgit v1.2.3