X-Git-Url: https://secure.softndesign.org/git/?a=blobdiff_plain;f=install%2Fcluster%2Fbin%2Fcreate_root_tarball.sh;fp=install%2Fcluster%2Fbin%2Fcreate_root_tarball.sh;h=0000000000000000000000000000000000000000;hb=3a30026aa30355dac5c5f9742da0fdba797701ea;hp=50088c745af484fc816c04496beebc621b476ec5;hpb=7fa766f7c1562671a1b5db6f365f6ec4e847c309;p=debian6500.git diff --git a/install/cluster/bin/create_root_tarball.sh b/install/cluster/bin/create_root_tarball.sh deleted file mode 100755 index 50088c7..0000000 --- a/install/cluster/bin/create_root_tarball.sh +++ /dev/null @@ -1,101 +0,0 @@ -#!/bin/bash - -# ============================================================================ -# Copyright (C) THALES. All rights reserved -# Author: Laurent Mazet -# Date : 20/02/2014 -# ============================================================================ - -# TODO -# * - -PROGNAME=$(basename $0) -TFTP=/opt/tftp -EXCLUDE=/tmp/$PROGNAME-exclude-$$ -IMAGE=$TFTP/root.tgz -TMPLOG=/tmp/$PROGNAME-$$.log -VER=2.0 - -# help function - -function usage () { - echo "usage: $PROGNAME [-h] [-v]" - echo " -h: help message" - echo " -v: version message" - exit $@ -} - -# formating functions - -function title () { echo -e "\033[0;1m$*\033[0;0m"; } -function pass () { echo -e "\033[1;32m$*\033[0;0m"; } -function warn () { echo -e "\033[1;33m$*\033[0;0m"; } -function fail () { echo -e "\033[1;31m$*\033[0;0m"; } -# check command - -function check () { - echo -n "$@: " - { eval $@; } >&$TMPLOG && pass OK || { fail KO; cat $TMPLOG; ERR=yes; } - rm -f $TMPLOG - test ! "$TEST" = yes -} - -# argument processing - -while [ $# -gt 0 ]; do - case "$1" in - -h) usage 0;; - -v) echo "$PROGNAME: version $VER"; exit;; - *) echo "unknown argument ($1)"; exit 1;; - esac - shift -done - -# create exclude list -cat - < $EXCLUDE -backup -boot -dev/* -dump -etc/.git -etc/udev/rules.d/70-persistent-net.rules -home -lost+found -opt/* -proc/* -root/* -run/* -sys/* -tmp/* -trc6500_list_patched_files.txt -usr/share/doc -usr/share/i18n -usr/share/info -usr/share/locale -usr/share/man -usr/share/zoneinfo -var/backups/* -var/cache/apt/* -var/cache/debconf/* -var/cache/fontconfig/* -var/cache/man/* -var/lib/apt -var/lib/aptitude -var/lib/dpkg -var/lib/samba/* -var/lock/* -var/log/* -var/run/* -EOF -check test -f $EXCLUDE - -# checks -[ -f $IMAGE ] && check rm -f $IMAGE -_OLDPWD=$(pwd) -cd / -check tar czf $IMAGE --exclude-from $EXCLUDE . -cd $_OLDPWD - -# clean exclude list -check rm -f $EXCLUDE -exit 0