DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#1 2011-02-20 19:35:37

neerav
Member
Registered: 2011-01-16
Posts: 15

Updating local copies of ffp packages

I wanted to share the script I use for keeping a local copy of all ffp packages.  Run it as a cron job and have the most up-to-date mirror.  In addition, my script links all of the packages from the 3 main repositories (that I know of) into the "/ffp/pkg/packages" directory so no more hunting around for a particular package or version.  No need to "find" either. ;-)

You can add a line to update any currently installed packages (cd packages; funpkg -u *.tgz) at the end.  I have left it out, since configuration files or customization may be lost when a package is uninstalled before installing a newer version, which would cause a considerable amount of headache to users.  This happened to me *once* before I had established backups of my ffp installation.

Suggestions, comments welcomed.

Code:

#!/ffp/bin/sh

## This script downloads/syncs all of the packages in the three major
## ffp package repositories.
##
## In addition, the script places links from the other repositories
## into the Fonz' Packages directory so one does not have to go
## hunting through directories for a package or lastest package
## version.
##
## Most useful if set as a weekly or monthly cron job
##
## Last Update: 20 Feb 2011 07:43:00

cd /ffp/pkg/ 

echo ""
date
echo ""
echo "################################################################################"
echo "# Syncing Fonz packages Folder                                                 #"
echo "################################################################################"
/ffp/bin/rsync -av --delete inreto.de::dns323/fun-plug/0.5/packages .
echo ""

echo "################################################################################"
echo "# Syncing Ulis additional Folder                                               #"
echo "################################################################################"
/ffp/bin/rsync -av --delete ffp.wolf-u.li::ffp/additional .
chown -R root:root /ffp/pkg/
echo ""
echo -n "Creating links..."
for dirname in `ls additional`
do
    for filename in `ls additional/$dirname`
    do
        ln -s ../additional/$dirname/$filename packages/$filename
        echo -n .
    done
done
echo " done."
echo ""

echo "################################################################################"
echo "# Syncing Fonz extra-packages Folder                                           #"
echo "################################################################################"
/ffp/bin/rsync -av --delete inreto.de::dns323/fun-plug/0.5/extra-packages/All/ ./extra-packages
chown -R root:root /ffp/pkg/
echo ""
echo -n "Creating links..."
cd extra-packages
files=`ls *.tgz`
cd ..
for filename in $files
do
    ln -s ../extra-packages/$filename packages/$filename
    echo -n .
done
echo " done."
echo ""

Last edited by neerav (2011-02-20 19:42:59)


Neerav
DNS-321 • 2 x 2TB WD20EADS in standard mode • ffp 0.5

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB