OK, I can't let you have the whole script - but below is a typical section from the script. Please bear in mind that this is a singlr section of the script and that there are many such sections.
Code:
# ----------------------------------------------------------------------------------------------------
# check filesystems if not exists then create it"
# ----------------------------------------------------------------------------------------------------
#
# STEPTOINFO[ 4 ]=0 # check filesystems if not exists then create it
STEPCOUNT=4
if [ ${STEPTOINFO[$STEPCOUNT]} -ne 0 ]; then
# {
printf "$STEPCOUNT" > "$SAVE_LAST_BREAK" # save actally position
printf "$STEPCOUNT; " >> "$SAVE_LAST_ACTIVITY"
#
if [ "$GLOBAL_ZONE" = "$TRUE" ]; then
# {
# ----------------------------------------------------------------------------------------------------
#
ANZINFORMATION=$((ANZINFORMATION + 1))
INSTALLINFORMATION[$ANZINFORMATION]="SECTION - %2d : ${SECTION_INFO[$STEPCOUNT]}"
#
showheader "${INSTALLINFORMATION[$ANZINFORMATION]}" "$STEPCOUNT" "$BACKGROUND"
#
ERRORFOUND=0
ERRORINFORMATION[$ANZINFORMATION]="Perfect"
#
# ----------------------------------------------------------------------------------------------------
# needed Filesystems:
#
ZFS_RPOOL_FILESYS="rpool/UC4 \
rpool/export rpool/export/home \
rpool/local rpool/local/Tivoli rpool/local/bmc rpool/local/oracle \
rpool/zzz rpool/zzz/core \
rpool/oracle \
rpool/TAD4D"
# save this info in an array
#
i=-1
for ZFS_RP_FS in $ZFS_RPOOL_FILESYS
do
i=$((i + 1)); ZFS_RPOOLFS[$i]=$ZFS_RP_FS
done
#
# ----------------------------------------------------------------------------------------------------
# needed Mountpoint for zfs filesystems:
#
i=-1
ZFS_FILESYSTEMS="/UC4 \
/export /export/home \
/usr/local /usr/local/Tivoli /usr/local/bmc /usr/local/oracle \
/zzz /zzz/core \
/oracle \
/opt/TAD4D"
# save this info in an array
#
i=-1
for ZFS_FS in $ZFS_FILESYSTEMS
do
i=$((i + 1)); ZFS_RPOOLFS[$i]=$ZFS_RP_FS
done
#
# ----------------------------------------------------------------------------------------------------
# needed Mountpoint for zfs filesystems:
#
i=-1
ZFS_FILESYSTEMS="/UC4 \
/export /export/home \
/usr/local /usr/local/Tivoli /usr/local/bmc /usr/local/oracle \
/zzz /zzz/core \
/oracle \
/opt/TAD4D"
# save this info in an array
#
i=-1
for ZFS_FS in $ZFS_FILESYSTEMS
do
i=$((i + 1)); ZFS_FILESYS[$i]=$ZFS_FS
done
#
# ----------------------------------------------------------------------------------------------------
# needed quotas for zfs filesystems:
#
ZFS_FILESYS_QUOTAS="250M \
3G 2G \
3G 262M 520M 520M \
2G 1G \
10G \
250M"
# save this info in an array
#
i=-1
for ZFS_FSQ in $ZFS_FILESYS_QUOTAS
do
i=$((i + 1)); ZFS_FSQUOTAS[$i]=$ZFS_FSQ
done
#
# ----------------------------------------------------------------------------------------------------
#
i=-1
while [ $i -lt $(( ${#ZFS_FILESYS[*]} - 1)) ]
do
# {
i=$((i + 1))
typeset -L20 TMP_ZFS_RPOOLFS
typeset -L20 TMP_ZFS_FILESYS
TMP_ZFS_RPOOLFS="'${ZFS_RPOOLFS[$i]}'"
TMP_ZFS_FILESYS="'${ZFS_FILESYS[$i]}'"
#
/usr/sbin/zfs list | grep "${ZFS_RPOOLFS[$i]}" > /dev/null 2>&1
RC=$?
if [ $RC -eq 0 ]; then
# {
# {
i=$((i + 1))
typeset -L20 TMP_ZFS_RPOOLFS
typeset -L20 TMP_ZFS_FILESYS
TMP_ZFS_RPOOLFS="'${ZFS_RPOOLFS[$i]}'"
TMP_ZFS_FILESYS="'${ZFS_FILESYS[$i]}'"
#
/usr/sbin/zfs list | grep "${ZFS_RPOOLFS[$i]}" > /dev/null 2>&1
RC=$?
if [ $RC -eq 0 ]; then
# {
if [ -d "${ZFS_FILESYS[$i]}" ]; then
# {
# >> zfs rpool/fs is available !!!
# >> directory is available !!!
showmessages "... NOTE: $TMP_ZFS_RPOOLFS and $TMP_ZFS_FILESYS exists" "Perfect" "$BACKGROUND"
# }
else
# {
showmessages "... NOTE: $TMP_ZFS_FILESYS not exists" "Faulty" "$BACKGROUND"
ERRORFOUND=1
# }
fi
# }
else
# {
# >> zfs rpool/fs is NOT available !!!
showmessages "... NOTE: $TMP_ZFS_RPOOLFS not exists" "Faulty" "$BACKGROUND"
if [ ! -d "${ZFS_FILESYS[$i]}" ]; then
# {
# >> directory is NOT available !!!"
showmessages "... NOTE: $TMP_ZFS_FILESYS not exists" "Faulty" "$BACKGROUND"
ERRORFOUND=1
# }
else
# {
showmessages "... NOTE: $TMP_ZFS_FILESYS is a directory not a ZFS-Filesystem from $TMP_ZFS_RPOOLFS" \
"Faulty" \
"$BACKGROUND"
ERRORFOUND=1
# }
fi
# }
fi
# }
done
#
# --------------------------------------------------------------------------------------------------------
#
if [ $ERRORFOUND -ne 0 ]; then
GLOBAL_ERROR=-1
ERRORINFORMATION[$ANZINFORMATION]="Faulty"
fi
fi
#
# ----------------------------------------------------------------------------------------------------
#
if [ $RETURNNEEDED -eq 0 ]; then
printf "\nenter <RETURN> to continue : "; read FORWARD
fi
# }
fi
# }
fi
You should be able to see how the checking is done in each section from this.
Hi everybody,
I am wondering if there is any tool or website out there which can track who is viewing my resume. It is very frustrating when you send your CV or Cover Letter and you receive no feedback from the company, you don't even know if they have checked it out.
Thanks for your help (1 Reply)
I am trying to send email using the "mail" command. I keep getting an "exec failed. errno=2." message.
Here is one the commands I have tried:
mail test@mycompany.com < test1.out
Any ideas what may be causing this error msg? (1 Reply)
In our directory there are too many files, & if I try to execute mv *.gz or rm *.l command it fails, providing error string as - 'arg list too long'. This doesnt happen always, is there any way we know, limit on the rm & mv command so we can take care of this failure in future executions ? (9 Replies)
I have a script that occasionally has a command here and there that fails and I would like to set my script up to just re run the command if the exit code is 1.
Is there a simple way to do that without if/thens or redirecting to the command again? (5 Replies)
Hi!
I have this situation with 3 shellscripts.
One is a "startscript" that simply calls other scripts. This one is scheduled with cron to run at regular intervals. That script runs what I'll refer to as Script 1.
Script 1 in turn runs script 2 (import_catalogs_buyer.sh)
Sometimes, seemingly... (2 Replies)
I'm trying to build some python modules on a Solaris 10 machine. It has gcc as /usr/sfw/bin/gcc.
# CC=gcc python setup.py build
running build
running build_py
running build_ext
cc -c actread.c -o actread.o
unable to execute cc: No such file or directory
error: command 'cc' failed with exit... (8 Replies)
I would like to get pm-suspend (or any other suspend method) working for a small new desktop computer. It is based on a Zotac GF-8200 ITX motherboard and an AMD Athlon II X@ 240 CPU using ArchLinux x86_64.
The pm-suspend script works, apparently putting the machine into suspend correctly... (0 Replies)
Hi, I put a for loop in a script to eject backup tapes from the robot. The command echo' output goes to the log file without problem, but command vmchange's output does not go to the log file although it's working fine. It still displays on the screen. I've tried '2>&1 1>$log', but nothing changed.... (5 Replies)
Sorry if this is the wrong place for this. I haven't done UNIX Admin in a long time and am trying to update the utilities on a Solaris server so that I can get Apache 2.4.25 installed. I am finding a lot of utilities that are just too far out of date and some versions are no longer supported. So... (0 Replies)