Added the 'packages' disco ball that installs and removes packages for you from parameters. Minor fixups to disco-fs-diff. Fixed a bug in disco-ball where files would not get deleted, and .unionfs was rsynced back into /.

This commit is contained in:
2012-08-23 19:39:07 -04:00
parent c000ebba48
commit 68c32cadf3
5 changed files with 32 additions and 3 deletions

View File

@@ -0,0 +1,25 @@
#!/bin/bash
#########################
#
# 00-installpkgs.sh
#
# For each package listed under $(hostname)/packages/[present|absent],
# install/remove the package there using the package management
# commands under $(hostname)/packages/commands/[present|absent].
#########################
HOSTNAME=$(hostname)
RETVAL=0
for op in present absent
do
PKGCMD=$(disco-param get ${HOSTNAME}/packages/commands/${op})
for pkgname in $(disco-param keys ${HOSTNAME}/packages/${op})
do
$PKGCMD $pkgname
RETVAL=$(expr $RETVAL + $?)
done
done
exit $RETVAL