Re: [OpenWrt-Devel] [PATCH] packages/opkg: provide conffiles list upon sysupgrade
* Alexey I. Froloff [03.02.2010 00:00]: > +#!/bin/sh > + > +add_opkg_conffiles() { > + local file="$1" > + find /usr/lib/opkg/info -name '*.conffiles' | xargs -r cat >> "$file" > + return 0 > +} seems complicated to me, why not: cat /usr/lib/opkg/info/*.conffiles >>"$file" bye, Bastian signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [patch] dropbear: use -q where applicable
* Matthias Buecher / Germany [02.02.2010 18:00]: > > Thanks Bastian, for your input. Much cleaner approach. > > What about the follwing (works fine on my router): > > grep -q -e "${PROG}" "/proc/${pid}/cmdline" && { > append ignore "${pid}" > break > } > > Or is there a special need for "grep -F" (=fgrep)? i think it's faster and consumes lower mem - why to grep for regexp, when we search a simple string? in practise it does'nt matter 8-) > Also I would not suppress error messages with "2>/dev/null". but in this special case i think it is ok - so we must not check for existing file (grep output's an error message, if $PID doesnt exist anymore) bye, Bastian signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Wanted: Package Maintainers
My SSH public key: ssh-dss B3NzaC1kc3MAAAEBAM9a2e8W3rBrh1g2ijh4K99sptoeFGt3vr0pS2iRSvcsgrTcVrafzDLCqj+VZZsZFhpayou6AAbverg0129M/e8yM+ec5dstb0Znfvj2Uv1JHpTlyKMusIvN3lezJZVF45qY7bFY+JFxRNDVrsWZcYypF6dhWgLmVKXEoRy21yuIYmFprnJVWpQO1zJJJvBU+lmj6Dc9KU5goprZEV+ZmDIHIp9T3NQaoCndxgmKp5ypLWMIjrQpF5HJ6fSwtFBRsj3P7eE+nTJQhMgsZpJxfIlC517OVMXA8Uo2RDHvmlhteV5LviqftR48rf+RpS7Z+AYaYZTD/9pHnanK5jpyTVUVAKtDEJpR529ps8Sfn0BGZr7Hk0mlAAABABn1Kz+3ZG06rjJvMET+f9cdl/ly2FI16I16weq+f+or3ATQwam5oYCri7zz4HH4D3HfKCTkdJ/0FE9DKkQBJEHVcUstmHOBEyDxH6U/SKw/26gPULnbsZbDgShpBRFXDYXx7Z0wOoA5Qw5EqFrOwaS21k91GIAG0qOroIyGzbR6LeIixS1iE9kYQmmqrvmhHG9xeUEghe0agvh1mS+33jeIZ0emoy1Bmk3QfmH1kdOwcUFsye0UOFYzynZLn72Cctr+S5LuCOE8Lm4gQxl7TmzPoZqhFptFUJJ+vkQhpWEvBuTg5hVpQzkQt9eHhqrPEAcB6AX8Mhvmk/9SZ0MRosUAAAEAUmm3yxP7OeEkpDxXawODbgwqH6tNcU2DvkJcZnGUNLio Lg7ElT4CJzXHsRHFQ/wL9nMQ1ouCZd+1xj5sBo9+hoE/aXV0nfye1wmwQeo3QAOpHCk0Ka2LFF+B8kL4CPzjYvAyUFlNMHcgpZD+r5luLtjE2Oach80puutXAzawN/qG6pGSxLDhGLHitdVrnK3o4DZ7VxOfaxNR869NgCaMiVI/kygxmBh16MOCUTwVky nX75enel4iJ//SFYwJM2tU/6Xxs9p2kipYv+JfWQeNBkjO0UldidCHi8D1kCrtQ7wu+81sAzSbieIdG4Q6oW6Y7h//jBIt9OisCgVEZ9Z/cg== monn...@pastel I think that the hash you want from "htdigest -c passwdfile openwrt username" you want is: monnier:openwrt:4057dacdc558c6929fd9e71d314cfda0 -- Stefan ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel Yep, time to generate new keys. :-P You should use RSA keys. ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Wanted: Package Maintainers
On Tue, 2 Feb 2010, Travis Kemen wrote: On Tue, Feb 2, 2010 at 9:10 PM, Stefan Monnier wrote: Oh, and did I say I *hate* Reply-To? Stefan "Stefan" == Stefan Monnier writes: I will commit your patches later today. I also need the username you want to use, a ssh public key for svn, and the hash created by 'htdigest -c passwdfile openwrt username' for trac and I will get you setup with access to LVM. I also request that you fill in https://dev.openwrt.org/wiki/packages for the package after you get access to trac. My SSH public key: ssh-dss B3NzaC1kc3MAAAEBAM9a2e8W3rBrh1g2ijh4K99sptoeFGt3vr0pS2iRSvcsgrTcVrafzDLCqj+VZZsZFhpayou6AAbverg0129M/e8yM+ec5dstb0Znfvj2Uv1JHpTlyKMusIvN3lezJZVF45qY7bFY+JFxRNDVrsWZcYypF6dhWgLmVKXEoRy21yuIYmFprnJVWpQO1zJJJvBU+lmj6Dc9KU5goprZEV+ZmDIHIp9T3NQaoCndxgmKp5ypLWMIjrQpF5HJ6fSwtFBRsj3P7eE+nTJQhMgsZpJxfIlC517OVMXA8Uo2RDHvmlhteV5LviqftR48rf+RpS7Z+AYaYZTD/9pHnanK5jpyTVUVAKtDEJpR529ps8Sfn0BGZr7Hk0mlAAABABn1Kz+3ZG06rjJvMET+f9cdl/ly2FI16I16weq+f+or3ATQwam5oYCri7zz4HH4D3HfKCTkdJ/0FE9DKkQBJEHVcUstmHOBEyDxH6U/SKw/26gPULnbsZbDgShpBRFXDYXx7Z0wOoA5Qw5EqFrOwaS21k91GIAG0qOroIyGzbR6LeIixS1iE9kYQmmqrvmhHG9xeUEghe0agvh1mS+33jeIZ0emoy1Bmk3QfmH1kdOwcUFsye0UOFYzynZLn72Cctr+S5LuCOE8Lm4gQxl7TmzPoZqhFptFUJJ+vkQhpWEvBuTg5hVpQzkQt9eHhqrPEAcB6AX8Mhvmk/9SZ0MRosUAAAEAUmm3yxP7OeEkpDxXawODbgwqH6tNcU2DvkJcZnGUNLio Lg7ElT4CJzXHsRHFQ/wL9nMQ1ouCZd+1xj5sBo9+hoE/aXV0nfye1wmwQeo3QAOpHCk0Ka2LFF+B8kL4CPzjYvAyUFlNMHcgpZD+r5luLtjE2Oach80puutXAzawN/qG6pGSxLDhGLHitdVrnK3o4DZ7VxOfaxNR869NgCaMiVI/kygxmBh16MOCUTwVky nX75enel4iJ//SFYwJM2tU/6Xxs9p2kipYv+JfWQeNBkjO0UldidCHi8D1kCrtQ7wu+81sAzSbieIdG4Q6oW6Y7h//jBIt9OisCgVEZ9Z/cg== monn...@pastel I think that the hash you want from "htdigest -c passwdfile openwrt username" you want is: monnier:openwrt:4057dacdc558c6929fd9e71d314cfda0 -- Stefan ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel Yep, time to generate new keys. :-P Nope, public keys are not intended to be secret. now, the password that he gave the hash for is a different story, that he should change. David Lang___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Wanted: Package Maintainers
On Tue, Feb 2, 2010 at 9:10 PM, Stefan Monnier wrote: > Oh, and did I say I *hate* Reply-To? > > >Stefan > > > > "Stefan" == Stefan Monnier writes: > >> I will commit your patches later today. I also need the username you > >> want to use, a ssh public key for svn, and the hash created by > >> 'htdigest -c passwdfile openwrt username' for trac and I will get you > >> setup with access to LVM. I also request that you fill in > >> https://dev.openwrt.org/wiki/packages for the package after you get > >> access to trac. > > > My SSH public key: > > > ssh-dss > B3NzaC1kc3MAAAEBAM9a2e8W3rBrh1g2ijh4K99sptoeFGt3vr0pS2iRSvcsgrTcVrafzDLCqj+VZZsZFhpayou6AAbverg0129M/e8yM+ec5dstb0Znfvj2Uv1JHpTlyKMusIvN3lezJZVF45qY7bFY+JFxRNDVrsWZcYypF6dhWgLmVKXEoRy21yuIYmFprnJVWpQO1zJJJvBU+lmj6Dc9KU5goprZEV+ZmDIHIp9T3NQaoCndxgmKp5ypLWMIjrQpF5HJ6fSwtFBRsj3P7eE+nTJQhMgsZpJxfIlC517OVMXA8Uo2RDHvmlhteV5LviqftR48rf+RpS7Z+AYaYZTD/9pHnanK5jpyTVUVAKtDEJpR529ps8Sfn0BGZr7Hk0mlAAABABn1Kz+3ZG06rjJvMET+f9cdl/ly2FI16I16weq+f+or3ATQwam5oYCri7zz4HH4D3HfKCTkdJ/0FE9DKkQBJEHVcUstmHOBEyDxH6U/SKw/26gPULnbsZbDgShpBRFXDYXx7Z0wOoA5Qw5EqFrOwaS21k91GIAG0qOroIyGzbR6LeIixS1iE9kYQmmqrvmhHG9xeUEghe0agvh1mS+33jeIZ0emoy1Bmk3QfmH1kdOwcUFsye0UOFYzynZLn72Cctr+S5LuCOE8Lm4gQxl7TmzPoZqhFptFUJJ+vkQhpWEvBuTg5hVpQzkQt9eHhqrPEAcB6AX8Mhvmk/9SZ0MRosUAAAEAUmm3yxP7OeEkpDxXawODbgwqH6tNcU2DvkJcZnGUNLio > > > > Lg7ElT4CJzXHsRHFQ/wL9nMQ1ouCZd+1xj5sBo9+hoE/aXV0nfye1wmwQeo3QAOpHCk0Ka2LFF+B8kL4CPzjYvAyUFlNMHcgpZD+r5luLtjE2Oach80puutXAzawN/qG6pGSxLDhGLHitdVrnK3o4DZ7VxOfaxNR869NgCaMiVI/kygxmBh16MOCUTwVky > > > > nX75enel4iJ//SFYwJM2tU/6Xxs9p2kipYv+JfWQeNBkjO0UldidCHi8D1kCrtQ7wu+81sAzSbieIdG4Q6oW6Y7h//jBIt9OisCgVEZ9Z/cg== > monn...@pastel > > > I think that the hash you want from "htdigest -c passwdfile openwrt > > username" you want is: > > >monnier:openwrt:4057dacdc558c6929fd9e71d314cfda0 > > > > -- Stefan > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > Yep, time to generate new keys. :-P Travis ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Wanted: Package Maintainers
Oh, and did I say I *hate* Reply-To? Stefan > "Stefan" == Stefan Monnier writes: >> I will commit your patches later today. I also need the username you >> want to use, a ssh public key for svn, and the hash created by >> 'htdigest -c passwdfile openwrt username' for trac and I will get you >> setup with access to LVM. I also request that you fill in >> https://dev.openwrt.org/wiki/packages for the package after you get >> access to trac. > My SSH public key: > ssh-dss > B3NzaC1kc3MAAAEBAM9a2e8W3rBrh1g2ijh4K99sptoeFGt3vr0pS2iRSvcsgrTcVrafzDLCqj+VZZsZFhpayou6AAbverg0129M/e8yM+ec5dstb0Znfvj2Uv1JHpTlyKMusIvN3lezJZVF45qY7bFY+JFxRNDVrsWZcYypF6dhWgLmVKXEoRy21yuIYmFprnJVWpQO1zJJJvBU+lmj6Dc9KU5goprZEV+ZmDIHIp9T3NQaoCndxgmKp5ypLWMIjrQpF5HJ6fSwtFBRsj3P7eE+nTJQhMgsZpJxfIlC517OVMXA8Uo2RDHvmlhteV5LviqftR48rf+RpS7Z+AYaYZTD/9pHnanK5jpyTVUVAKtDEJpR529ps8Sfn0BGZr7Hk0mlAAABABn1Kz+3ZG06rjJvMET+f9cdl/ly2FI16I16weq+f+or3ATQwam5oYCri7zz4HH4D3HfKCTkdJ/0FE9DKkQBJEHVcUstmHOBEyDxH6U/SKw/26gPULnbsZbDgShpBRFXDYXx7Z0wOoA5Qw5EqFrOwaS21k91GIAG0qOroIyGzbR6LeIixS1iE9kYQmmqrvmhHG9xeUEghe0agvh1mS+33jeIZ0emoy1Bmk3QfmH1kdOwcUFsye0UOFYzynZLn72Cctr+S5LuCOE8Lm4gQxl7TmzPoZqhFptFUJJ+vkQhpWEvBuTg5hVpQzkQt9eHhqrPEAcB6AX8Mhvmk/9SZ0MRosUAAAEAUmm3yxP7OeEkpDxXawODbgwqH6tNcU2DvkJcZnGUNLio > > Lg7ElT4CJzXHsRHFQ/wL9nMQ1ouCZd+1xj5sBo9+hoE/aXV0nfye1wmwQeo3QAOpHCk0Ka2LFF+B8kL4CPzjYvAyUFlNMHcgpZD+r5luLtjE2Oach80puutXAzawN/qG6pGSxLDhGLHitdVrnK3o4DZ7VxOfaxNR869NgCaMiVI/kygxmBh16MOCUTwVky > > nX75enel4iJ//SFYwJM2tU/6Xxs9p2kipYv+JfWQeNBkjO0UldidCHi8D1kCrtQ7wu+81sAzSbieIdG4Q6oW6Y7h//jBIt9OisCgVEZ9Z/cg== > monn...@pastel > I think that the hash you want from "htdigest -c passwdfile openwrt > username" you want is: >monnier:openwrt:4057dacdc558c6929fd9e71d314cfda0 > -- Stefan ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Wanted: Package Maintainers
> I will commit your patches later today. I also need the username you > want to use, a ssh public key for svn, and the hash created by > 'htdigest -c passwdfile openwrt username' for trac and I will get you > setup with access to LVM. I also request that you fill in > https://dev.openwrt.org/wiki/packages for the package after you get > access to trac. My SSH public key: ssh-dss B3NzaC1kc3MAAAEBAM9a2e8W3rBrh1g2ijh4K99sptoeFGt3vr0pS2iRSvcsgrTcVrafzDLCqj+VZZsZFhpayou6AAbverg0129M/e8yM+ec5dstb0Znfvj2Uv1JHpTlyKMusIvN3lezJZVF45qY7bFY+JFxRNDVrsWZcYypF6dhWgLmVKXEoRy21yuIYmFprnJVWpQO1zJJJvBU+lmj6Dc9KU5goprZEV+ZmDIHIp9T3NQaoCndxgmKp5ypLWMIjrQpF5HJ6fSwtFBRsj3P7eE+nTJQhMgsZpJxfIlC517OVMXA8Uo2RDHvmlhteV5LviqftR48rf+RpS7Z+AYaYZTD/9pHnanK5jpyTVUVAKtDEJpR529ps8Sfn0BGZr7Hk0mlAAABABn1Kz+3ZG06rjJvMET+f9cdl/ly2FI16I16weq+f+or3ATQwam5oYCri7zz4HH4D3HfKCTkdJ/0FE9DKkQBJEHVcUstmHOBEyDxH6U/SKw/26gPULnbsZbDgShpBRFXDYXx7Z0wOoA5Qw5EqFrOwaS21k91GIAG0qOroIyGzbR6LeIixS1iE9kYQmmqrvmhHG9xeUEghe0agvh1mS+33jeIZ0emoy1Bmk3QfmH1kdOwcUFsye0UOFYzynZLn72Cctr+S5LuCOE8Lm4gQxl7TmzPoZqhFptFUJJ+vkQhpWEvBuTg5hVpQzkQt9eHhqrPEAcB6AX8Mhvmk/9SZ0MRosUAAAEAUmm3yxP7OeEkpDxXawODbgwqH6tNcU2DvkJcZnGUNLioLg7ElT4CJzXHsRHFQ/wL9nMQ1ouCZd+1xj5sBo9+hoE/aXV0nfye1wmwQeo3QAOpHCk0Ka2LFF+B8kL4CPzjYvAyUFlNMHcgpZD+r5luLtjE2Oach80puutXAzawN/qG6pGSxLDhGLHitdVrnK3o4DZ7VxOfaxNR869NgCaMiVI/kygxmBh16MOCUTwVky nX75enel4iJ//SFYwJM2tU/6Xxs9p2kipYv+JfWQeNBkjO0UldidCHi8D1kCrtQ7wu+81sAzSbieIdG4Q6oW6Y7h//jBIt9OisCgVEZ9Z/cg== monn...@pastel I think that the hash you want from "htdigest -c passwdfile openwrt username" you want is: monnier:openwrt:4057dacdc558c6929fd9e71d314cfda0 -- Stefan ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Wanted: Package Maintainers
Hi, i wanna maintain ctorrent, openssh and openssl. maybe not all of them are accepted ...but im happy about every of this packages greets Am Samstag 30 Januar 2010 00:13:22 schrieb Travis Kemen: > We are looking for people that want to maintain and update individual > packages. If you are interested please contact me with what package you > want to maintain. > > Thanks, > > Travis Kemen > OpenWrt Developer > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [PATCH] packages/opkg: provide conffiles list upon sysupgrade
When performing sysupgrade process, opkg should report its conffiles list. Signed-off-by: Alexey I. Froloff --- package/opkg/Makefile|2 ++ package/opkg/files/opkg-conffiles.sh |8 2 files changed, 10 insertions(+), 0 deletions(-) create mode 100644 package/opkg/files/opkg-conffiles.sh diff --git a/package/opkg/Makefile b/package/opkg/Makefile index 6894ae7..40147ce 100644 --- a/package/opkg/Makefile +++ b/package/opkg/Makefile @@ -69,7 +69,9 @@ define Package/opkg/install $(INSTALL_DIR) $(1)/usr/lib/opkg $(INSTALL_DIR) $(1)/bin $(INSTALL_DIR) $(1)/etc + $(INSTALL_DIR) $(1)/lib/upgrade $(INSTALL_DATA) ./files/opkg.conf $(1)/etc/ + $(INSTALL_DATA) ./files/opkg-conffiles.sh $(1)/lib/upgrade/ $(SED) 's,S,$(PKGARCH),g' $(1)/etc/opkg.conf $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/opkg-cl $(1)/bin/opkg endef diff --git a/package/opkg/files/opkg-conffiles.sh b/package/opkg/files/opkg-conffiles.sh new file mode 100644 index 000..21a0dda --- /dev/null +++ b/package/opkg/files/opkg-conffiles.sh @@ -0,0 +1,8 @@ +#!/bin/sh + +add_opkg_conffiles() { + local file="$1" + find /usr/lib/opkg/info -name '*.conffiles' | xargs -r cat >> "$file" + return 0 +} +append sysupgrade_init_conffiles add_opkg_conffiles -- 1.6.5.8 ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
[OpenWrt-Devel] [patch][orion] move 2.6.30 configuration and patches to their appropriate names
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hello, please execute the following svn commands inside trunk to correct the names of the orion config file and patches folder: svn mv target/linux/orion/config-default target/linux/orion/config-2.6.30 svn mv target/linux/orion/patches/ target/linux/orion/patches-2.6.30/ Could any OpenWrt developer do this? kaloz? anyone? [orion] move 2.6.30 configuration and patches to their appropriate names Signed-off by: Matthias Buecher - -- http://www.maddes.net/ Home: Earth / Germany / Ruhr-Area -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAktofNYACgkQUXXT+9wZdbVtSgCfTbF9/MWawFtj8jLa2ahEDhvE N3oAoKiVbSXLOZSOVlT/HTYD/AlwjurB =ONnr -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] Wanted: Package Maintainers
I will commit your patches later today. I also need the username you want to use, a ssh public key for svn, and the hash created by 'htdigest -c passwdfile openwrt username' for trac and I will get you setup with access to LVM. I also request that you fill in https://dev.openwrt.org/wiki/packages for the package after you get access to trac. Thanks, Travis Kemen OpenWrt Developer On Mon, Feb 1, 2010 at 12:41 PM, Stefan Monnier wrote: > > We are looking for people that want to maintain and update individual > > packages. If you are interested please contact me with what package you > want > > to maintain. > > I'd be happy to maintain the LVM package. > I guess that presumes it gets accepted first ;-) > > >Stefan > > ___ > openwrt-devel mailing list > openwrt-devel@lists.openwrt.org > https://lists.openwrt.org/mailman/listinfo/openwrt-devel > ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [patch] dropbear: use -q where applicable
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Thanks Bastian, for your input. Much cleaner approach. What about the follwing (works fine on my router): grep -q -e "${PROG}" "/proc/${pid}/cmdline" && { append ignore "${pid}" break } Or is there a special need for "grep -F" (=fgrep)? Also I would not suppress error messages with "2>/dev/null". Maddes On 02.02.2010 09:07, Bastian Bittorf wrote: > * Matthias Buecher / Germany [01.02.2010 18:20]: >> >> # check if client connection >> -ps | grep -e "^[ ]*${pid} " | grep "${PROG}" >/dev/null >> +ps | grep -e "^[ ]*${pid} " | grep -q -e "${PROG}" >> if [ $? -eq 0 ] >> then > > I propose a more clever variant, which does not fork but > relies on procfs (but openWRT scripts rely on it anyway..) > > > fgrep -q "${PROG}" "/proc/${pid}/cmdline" 2>/dev/null && { > some_action > } > > bye, Bastian -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEARECAAYFAktoWCsACgkQUXXT+9wZdbVGagCfShUUaLbRIc7MxQsxYlcQvgKF Ae0AnjTsd9m39ZVlzGG6/7MlTICMJytT =VCeH -END PGP SIGNATURE- Index: package/dropbear/files/dropbear.init === --- package/dropbear/files/dropbear.init (revision 19500) +++ package/dropbear/files/dropbear.init (working copy) @@ -1,5 +1,5 @@ #!/bin/sh /etc/rc.common -# Copyright (C) 2006-2009 OpenWrt.org +# Copyright (C) 2006-2010 OpenWrt.org # Copyright (C) 2006 Carlos Sobrinho NAME=dropbear @@ -91,7 +91,7 @@ local pidfile for pidfile in `ls /var/run/${NAME}.*.pid` do - start-stop-daemon -K -s KILL -p "${pidfile}" -n "${NAME}" >/dev/null + start-stop-daemon -q -K -s KILL -p "${pidfile}" -n "${NAME}" rm -f "${pidfile}" done [ -z "${pidfile}" ] && echo "${initscript}: no pid files, if you get problems with start then try killclients" @@ -112,12 +112,10 @@ [ "${pid}" -eq 0 ] && break # check if client connection - ps | grep -e "^[ ]*${pid} " | grep "${PROG}" >/dev/null - if [ $? -eq 0 ] - then + grep -q -e "${PROG}" "/proc/${pid}/cmdline" && { append ignore "${pid}" break - fi + } done # get all server pids that should be ignored @@ -130,9 +128,10 @@ local skip for pid in `pidof "${NAME}"` do - # check if correct program - ps | grep -e "^[ ]*${pid} " | grep "${PROG}" >/dev/null - [ $? -ne 0 ] && continue + # check if correct program, otherwise process next pid + grep -q -e "${PROG}" "/proc/${pid}/cmdline" || { + continue + } # check if pid should be ignored (servers, ourself) skip=0 -BEGIN PGP SIGNATURE- Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iEYEABECAAYFAktoWCsACgkQUXXT+9wZdbUsGQCdFGBYbyxtBgEkMJC3uJznKhOZ /74AoOeLuj41Pr19D4P9AYYw7Ftj2ZDa =uVb6 -END PGP SIGNATURE- ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel
Re: [OpenWrt-Devel] [patch] dropbear: use -q where applicable
* Matthias Buecher / Germany [01.02.2010 18:20]: > > # check if client connection > - ps | grep -e "^[ ]*${pid} " | grep "${PROG}" >/dev/null > + ps | grep -e "^[ ]*${pid} " | grep -q -e "${PROG}" > if [ $? -eq 0 ] >then I propose a more clever variant, which does not fork but relies on procfs (but openWRT scripts rely on it anyway..) fgrep -q "${PROG}" "/proc/${pid}/cmdline" 2>/dev/null && { some_action } bye, Bastian signature.asc Description: Digital signature ___ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel