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:
25
balls/packages/scripts/00-installpkgs.sh
Normal file
25
balls/packages/scripts/00-installpkgs.sh
Normal 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
|
||||
Reference in New Issue
Block a user