[LEDE-DEV] please add encloses /usr/bin/installed.sh to main image of lede/openWRT

2018-04-22 Thread Ludwig Jaffe
please add the list-installed-script to the main image of openwrt
as it is small and very useful to find out what is installed on the box.

original:
devkid/list-user-installed-

packages.sh

I "installed" the script as /usr/bin/installed.sh with 755 rights
also I suggest that it should be put at
/usr/bin
or to
/bin  (but only if the main image does not contain /usr/bin)


script: /usr/bin/installed.sh

#!/bin/sh

FLASH_TIME=$(opkg info busybox | grep '^Installed-Time: ')

for i in $(opkg list-installed | cut -d' ' -f1)
do
    if [ "$(opkg info $i | grep '^Installed-Time: ')" != "$FLASH_TIME" ]
    then
    echo $i
    fi
done



---

Please integrate it.

Thanks

Ludwig




signature.asc
Description: OpenPGP digital signature
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


[LEDE-DEV] Suggested resolution to problem: OpenWRT box gets overfilled with a package, no space left on device

2018-04-22 Thread Ludwig Jaffe
Problem: OpenWRT box gets overfilled with a package, no space left on device
and no good clean up.

Suggestion:
opkg installes to /tmp/staging which is ramdisk
then it says du -c /tmp/staging
and df /overlay
then compare if the last line of df has a bigger number
then du -c /tmp/staging.
If yes, then mv /tmp/staging/* /
in no, write "staging failed, package to big. Free $df - $du-c bytes and
try again"

Do you like the algorithm above?
Should it be implemented as a wrapper script?


Cheers,

Ludwig




0xF8804DAF.asc
Description: application/pgp-keys
___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev


Re: [LEDE-DEV] Suggested resolution to problem: OpenWRT box gets overfilled with a package, no space left on device

2018-04-22 Thread Ludwig Jaffe
I forgot:

first say

rm -rf /tmp/staging


and at the end clean up to be sure:

rm -rf /tmp/staging



On 04/23/2018 01:30 AM, Ludwig Jaffe wrote:
> Problem: OpenWRT box gets overfilled with a package, no space left on device
> and no good clean up.
>
> Suggestion:
> opkg installes to /tmp/staging which is ramdisk
> then it says du -c /tmp/staging
> and df /overlay
> then compare if the last line of df has a bigger number
> then du -c /tmp/staging.
> If yes, then mv /tmp/staging/* /
> in no, write "staging failed, package to big. Free $df - $du-c bytes and
> try again"
>
> Do you like the algorithm above?
> Should it be implemented as a wrapper script?
>
>
> Cheers,
>
> Ludwig
>
>



___
Lede-dev mailing list
Lede-dev@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/lede-dev