[Frugalware-git] fw32: fw32 * add some more commands
Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fw32.git;a=commitdiff;h=df75311a21acd304a199caf9e9166c6da9753535 commit df75311a21acd304a199caf9e9166c6da9753535 Author: James Buren r...@frugalware.org Date: Sun Oct 23 17:27:45 2011 -0500 fw32 * add some more commands diff --git a/fw32 b/fw32 old mode 100644 new mode 100755 index 1446e8a..8fffe4f --- a/fw32 +++ b/fw32 @@ -39,7 +39,7 @@ umount() mkdir() { - /usr/bin/mkdir -p $1 + /usr/bin/mkdir -p $FW32_ROOT/$1 [ $? -ne 0 ] Failed to create directory $1. } @@ -49,6 +49,13 @@ pacman_g2() [ $? -ne 0 ] error pacman-g2 failed to perform its action. } +mount_all() +{ + for i in ${FW32_DIRS[@]}; do + mount $i + done +} + umount_all() { for i in $(/usr/bin/grep -o -E $FW32_ROOT/[a-zA-Z0-9_/]+ /proc/mounts); do @@ -56,4 +63,15 @@ umount_all() done } +create() +{ + [ -d $FW32_ROOT ] error $FW32_ROOT appears to already exist. + for i in ${FW32_DIRS[@]}; do + mkdir $i + done + mount /var/cache/pacman-g2/pkg + pacman_g2 -Sy shadow coreutils findutils which wget file tar gzip bzip2 util-linux procps kbd psmisc less + umount /var/cache/pacman-g2/pkg +} + [ $UID -ne 0 ] [ $EUID -ne 0 ] error You must run this command as root. ___ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git
[Frugalware-git] fw32: fw32 * add some more commands
Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fw32.git;a=commitdiff;h=ae8fcef46fb6cb672a6eb02f032c3606efc9a378 commit ae8fcef46fb6cb672a6eb02f032c3606efc9a378 Author: James Buren r...@frugalware.org Date: Mon Oct 24 04:11:40 2011 -0500 fw32 * add some more commands diff --git a/fw32 b/fw32 index 8fffe4f..ff60bd5 100755 --- a/fw32 +++ b/fw32 @@ -49,6 +49,12 @@ pacman_g2() [ $? -ne 0 ] error pacman-g2 failed to perform its action. } +run() +{ + /usr/bin/linux32 /usr/sbin/chroot $FW32_ROOT $@ + [ $? -ne 0 ] error Failed to run command $@. +} + mount_all() { for i in ${FW32_DIRS[@]}; do @@ -74,4 +80,21 @@ create() umount /var/cache/pacman-g2/pkg } +update() +{ + umount_all + mount /var/cache/pacman-g2/pkg + pacman_g2 -Syuf + umount /var/cache/pacman-g2/pkg + mount_all + run fc-cache --force --system-only +} + +delete() +{ + umount_all + rm -rf $FW32_ROOT + [ $? -ne 0 ] error Failed to delete $FW32_ROOT. +} + [ $UID -ne 0 ] [ $EUID -ne 0 ] error You must run this command as root. ___ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git
[Frugalware-git] fw32: fw32 * add some more commands
Git-Url: http://git.frugalware.org/gitweb/gitweb.cgi?p=fw32.git;a=commitdiff;h=78074d1b92151f3c3673564ee354e5be393a5f42 commit 78074d1b92151f3c3673564ee354e5be393a5f42 Author: James Buren r...@frugalware.org Date: Mon Oct 24 06:28:42 2011 -0500 fw32 * add some more commands diff --git a/fw32 b/fw32 index ff60bd5..1bf04ea 100755 --- a/fw32 +++ b/fw32 @@ -76,8 +76,9 @@ create() mkdir $i done mount /var/cache/pacman-g2/pkg - pacman_g2 -Sy shadow coreutils findutils which wget file tar gzip bzip2 util-linux procps kbd psmisc less + pacman_g2 -Sy shadow coreutils findutils which wget file tar gzip bzip2 util-linux procps kbd psmisc less pacman-g2 umount /var/cache/pacman-g2/pkg + mount_all } update() @@ -87,7 +88,7 @@ update() pacman_g2 -Syuf umount /var/cache/pacman-g2/pkg mount_all - run fc-cache --force --system-only + [ -x $FW32_ROOT/usr/bin/fc-cache ] run /usr/bin/fc-cache --force --system-only } delete() @@ -97,4 +98,28 @@ delete() [ $? -ne 0 ] error Failed to delete $FW32_ROOT. } +clean() +{ + mount_all + pacman_g2 -Sc +} + +install() +{ + umount_all + mount /var/cache/pacman-g2/pkg + pacman_g2 -Syf $@ + umount /var/cache/pacman-g2/pkg + mount_all +} + +uninstall() +{ + umount_all + mount /var/cache/pacman-g2/pkg + pacman_g2 -Rs $@ + umount /var/cache/pacman-g2/pkg + mount_all +} + [ $UID -ne 0 ] [ $EUID -ne 0 ] error You must run this command as root. ___ Frugalware-git mailing list Frugalware-git@frugalware.org http://frugalware.org/mailman/listinfo/frugalware-git