Here's a bunch of small patches I have and figure that some of that
should probably be integrated upstream:
- A WL700gE profile for the 2.6 kernel.  I think this needs further
  work to be useful, since the firmware it builds is too large: it
  boots but doesn't have enough spare space for the jffs2 partition,
  so you can't later on change /sbin/init to boot from the drive.
  I personally solved this problem by changing the /sbin/mount_root
  so it tries tl mount the HDD or USB partition and boots from it
  if possible.
- Let /etc/init.d/cron start correctly when you have more than a single
  file in /etc/crontabs.  Also, be more careful not to create a funny
  link inside /var/spool/cron/crontabs in case your
  /var/spool/cron/crontabs is not a symlink but a real directory.
- If you specify several httpd daemons to run, make sure
  /etc/init.d/httpd start doesn't concatenate the args of the first
  instance to the args of the second.
  Also add the possibility to specify a user under which to run the
  server, in case you had the good idea to compile busybox's httpd with
  support for the "-u" argument.
- Tell cups to use the /var rather than /tmp area: by default they are
  the same, but in case the user splits them (e.g. she has a real
  drive), /var is probably a better choice.  Also because cups has the
  tendency to "chmod go-w" on all the directories it needs to look at,
  which would prevent the use of a /tmp with 1777 access rights.
- Fix a typo in /etc/init.d/polipo "pid-file" -> "pid_file".  Also check
  polipo's config file to see if it has a pidFile specified in there.
- In /etc/init.d/mpd, don't recreate the DB every time we start mpd (it
  takes minutes on my box).  Also don't mess with the playlist and don't
  start playing: that's what mpd clients are for.


        Stefan


Index: target/linux/brcm47xx/profiles/WL700GE.mk
===================================================================
--- target/linux/brcm47xx/profiles/WL700GE.mk   (révision 0)
+++ target/linux/brcm47xx/profiles/WL700GE.mk   (révision 0)
@@ -0,0 +1,22 @@
+#
+# Copyright (C) 2006 OpenWrt.org
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+# Rather than include the fdisk package, I prefer to enable fdisk
+# in busybox, but I don't know how to specify this here.
+define Profile/WL700GE
+  NAME:=WL-700gE
+  PACKAGES:=-ppp -ppp-mod-pppoe -kmod-ipt-nathelper -iptables -dnsmasq -bridge 
-dropbear kmod-ide-core kmod-ide-aec62xx kmod-fs-ext3 fdisk e2fsprogs
+endef
+
+define Profile/WL700GE/Description
+       Minimal package set optimized for booting the WL-700gE from flash
+       with the bare minimum to create a new filesystem on the HDD
+       so as to boot from it.
+endef
+$(eval $(call Profile,WL700GE))
+
+
Index: package/busybox/files/cron
===================================================================
--- package/busybox/files/cron  (révision 11579)
+++ package/busybox/files/cron  (copie de travail)
@@ -3,9 +3,9 @@
 START=50
 
 start () {
-       [ -z $(ls /etc/crontabs/) ] && exit 1
+       [ -z "$(ls /etc/crontabs/)" ] && exit 1
        mkdir -p /var/spool/cron
-       [ -L /var/spool/cron/crontabs ] || ln -s /etc/crontabs 
/var/spool/cron/crontabs
+       ln -s /etc/crontabs /var/spool/cron/ 2>/dev/null
        crond -c /etc/crontabs
 }
 
Index: package/busybox/files/httpd
===================================================================
--- package/busybox/files/httpd (révision 11579)
+++ package/busybox/files/httpd (copie de travail)
@@ -13,9 +13,12 @@
 httpd_config() {
        local cfg="$1"
        local c_file port realm home
+       unset args
 
        config_get c_file "$cfg" c_file
        [ -n "$c_file" -a -f "$c_file" ] && append args "-c \"$c_file\""
+        config_get user "$cfg" user
+        [ -n "$user" ] && append args "-u \"$user\""
        config_get port "$cfg" port
        append args "-p ${port:-80}"
        config_get home "$cfg" home
@@ -36,7 +39,6 @@
        config_foreach system_config system
        hostname="${hostname:-OpenWrt}"
 
-       unset args
        config_load httpd
        [ "$?" != "0" ] && {
                uci_set_default httpd <<EOF
Index: net/cups/files/etc/cups/cupsd.conf
===================================================================
--- net/cups/files/etc/cups/cupsd.conf  (révision 11579)
+++ net/cups/files/etc/cups/cupsd.conf  (copie de travail)
@@ -21,12 +21,12 @@
 MaxPrinterHistory 10
 #Printcap /etc/printcap
 #PrintcapFormat BSD
-RequestRoot /tmp/cups
+RequestRoot /var/cups
 #RemoteRoot remroot
 User root
 Group root
 RIPCache 512k
-TempDir /tmp/cups
+TempDir /var/cups
 Port 631
 HostNameLookups Off
 KeepAlive On
Index: net/p910nd/files/p910nd.init
===================================================================
--- net/p910nd/files/p910nd.init        (révision 11579)
+++ net/p910nd/files/p910nd.init        (copie de travail)
@@ -28,7 +28,11 @@
        append_string "$section" device "-f "
        append_string "$section" port ""
        config_get_bool "enabled" "$section" "enabled" '1'
-       [ "$enabled" -gt 0 ] && /usr/sbin/p910nd $args
+       [ "$enabled" -gt 0 ] && {
+            cmd="/usr/sbin/p910nd $args"
+            config_get user "$section" user ""
+            if [ -z "$user" ]; then $cmd; else su -c "$cmd" "$user"; fi
+        }
 }
 
 stop_service() {
Index: net/polipo/files/polipo.init
===================================================================
--- net/polipo/files/polipo.init        (révision 11579)
+++ net/polipo/files/polipo.init        (copie de travail)
@@ -20,8 +20,12 @@
 get_pid_file() {
        local cfg="$1"
 
-       config_get pid_file "$cfg" pid-file
-       [ -n "$pid_file" ] || pid_file="/var/run/$NAME.pid"
+       config_get pid_file "$cfg" pid_file
+       [ -n "$pid_file" ] || {
+           config_get config_file "$cfg" config_file
+            pid_file="$(sed -n -e 's/^pidFile=//p')"
+            [ -n "$pid_file" ] || pid_file="/var/run/$NAME.pid"
+        }
 }
 
 get_options() {
Index: sound/mpd/files/mpd.init
===================================================================
--- sound/mpd/files/mpd.init    (révision 11579)
+++ sound/mpd/files/mpd.init    (copie de travail)
@@ -12,19 +12,9 @@
        if [ ! -d $pld ]; then
                mkdir -p $pld
        fi
-       #create mpd db
-        /usr/bin/mpd --stdout --create-db
        
-       #optional export for mpc
-        #export MPD_HOST=127.0.0.1
-       
        #start mpd
         /usr/bin/mpd
-       
-       #generate playlist and start to play
-        /usr/bin/mpc listall | /usr/bin/mpc add -
-        /usr/bin/mpc play
-       /usr/bin/mpc repeat     
 }
 
 stop() {

_______________________________________________
openwrt-devel mailing list
[email protected]
http://lists.openwrt.org/cgi-bin/mailman/listinfo/openwrt-devel

Reply via email to