瀏覽代碼

auth bug fix, keep /etc on update by default

Danja Vasiliev 9 年之前
父節點
當前提交
9ab3f8d832
共有 3 個文件被更改,包括 8 次插入5 次删除
  1. 4 3
      openwrt/common/etc/lighttpd/lighttpd.conf
  2. 2 0
      openwrt/common/opt/lib/admin/admin2.cgi
  3. 2 2
      openwrt/tools/make_fw.sh

+ 4 - 3
openwrt/common/etc/lighttpd/lighttpd.conf

@@ -58,6 +58,10 @@ $HTTP["request-method"] == "POST" {
   )
 }
 
+## defines var.superglueVersion from /etc/superglue_version
+include_shell "/etc/lighttpd/vars.sh"
+setenv.add-response-header += ( "X-Superglue-Version" => var.superglueVersion )
+
 $HTTP["request-method"] == "GET" {
   url.rewrite = (
     "^/resources/(.*)$" =>  "resources/$1",
@@ -98,6 +102,3 @@ $HTTP["request-method"] == "POST" {
 
 ## reads optional conf files
 include_shell "/etc/lighttpd/opts.sh mime.conf compress.conf"
-## defines var.superglueVersion from /etc/superglue_version
-include_shell "/etc/lighttpd/vars.sh"
-setenv.add-response-header = ( "X-Superglue-Version" => var.superglueVersion )

+ 2 - 0
openwrt/common/opt/lib/admin/admin2.cgi

@@ -279,6 +279,7 @@ showMesg() {
 
 updateFw() {
   local _FWFILE="${_TMP}/fwupload.bin"
+  local _FWRESET='-c' ## preserve changes in /etc/ by default
   _OUT="$(sysupgrade -T $_FWFILE 2>&1)" ||
   { _ERR=$?; rm -rf $_FWFILE; showMesg 'This is not a firmware!' '3' "$_OUT"; }
   [[ $POST_fwreset == 'on' ]] && { _FWRESET='-n'; logThis 'fw reset requested'; }
@@ -648,6 +649,7 @@ wankey=$(doUci get wankey)
       </div>
       <div style='display:inline-block;'>
         <select name='sgddnsdomain' class='inline'>
+          <option value='spg.lu' <% [[ "$ddomain" == 'spg.lu' ]] && _echo 'selected' %>>.spg.lu</option>
           <option value='spgl.it' <% [[ "$ddomain" == 'spgl.it' ]] && _echo 'selected' %>>.spgl.it</option>
           <option value='spgl.cc' <% [[ "$ddomain" == 'spgl.cc' ]] && _echo 'selected' %>>.spgl.cc</option>
           <option value='superglue.it' <% [[ "$ddomain" == 'superglue.it' ]] && _echo 'selected' %>>.superglue.it</option>

+ 2 - 2
openwrt/tools/make_fw.sh

@@ -52,7 +52,7 @@ let _MINOR++
 _OPENWRT_REVISION="$_PWD/openwrt.revision"
 
 ## browser extension (if any)
-_EXT_SRC="$_PWD/../../editor/build/superglue-firefox.xpi"
+#_EXT_SRC="$_PWD/../../editor/build/superglue-firefox.xpi"
 
 ## include devTools?
 _DEV_TOOLS=false
@@ -124,7 +124,7 @@ for _TARGET in $_TARGETS; do
   sleep 2
 
   ## currently unused packages
-  # kmod-fs-vfat kmod-fs-btrfs btrfs-progs kmod-fs-ext4 sudo 
+  # kmod-fs-vfat kmod-fs-ext4 sudo 
 
   make image PROFILE=$_TARGET PACKAGES="bash gawk openssh-sftp-server haserl lighttpd lighttpd-mod-access lighttpd-mod-cgi lighttpd-mod-compress lighttpd-mod-accesslog lighttpd-mod-rewrite lighttpd-mod-auth lighttpd-mod-alias lighttpd-mod-proxy lighttpd-mod-setenv blkid block-mount mini-sendmail kmod-usb-storage kmod-scsi-generic mount-utils kmod-nls-cp437 kmod-nls-iso8859-1 kmod-nls-utf8 kmod-nls-base coreutils-stat mini-httpd-htpasswd wireless-tools avahi-daemon kmod-fs-btrfs btrfs-progs swap-utils sfdisk coreutils-base64 coreutils-sha1sum rpcd-mod-iwinfo procps-ps uhttpd uhttpd-mod-ubus openvpn-openssl dtach curl" FILES=$_PWD/$_TARGET.tmp BIN_DIR=$_BIN_DIR/openwrt
   _ERR=$?