Tuesday, September 22, 2015

RPM Distribution - System Verification (versys)

I have had this in my toolbox for a while and am always recreating it on any RPM based distribution.
So might as well dump it here

#!/bin/sh

export logFile=/var/log/versys.log

if [ $# -gt 0 ]
then
 if [ "$1" == "-r" ]
 then
  cat $logFile | grep -v ">>" | less
 else
  echo
  echo "$0 [-r]"
  echo
  echo "No args to generate, -r to view the report"
  echo
 fi
else 
 echo ">>>> VerSys Initialising: `date` <<<<" | tee -a $logFile
 echo ">>>> Writing to: $logFile <<<<" | tee -a $logFile

  echo ">>>> RPM list & Sort <<<<" | tee -a $logFile

 for i in `rpm -qa | sort`
 do
  echo ">>>> VERIFYING $i" <<<<" | tee -a $logFile
  rpm -V $i | tee -a $logFile 
 done
fi

Sunday, August 9, 2015

bsdconfig(8) and FreeBSD 10.1 DVD

Seem's that you cannot use bsdconfig(8) out of the box with the FreeBSD DVD.

Below are the steps to get it working (may have to change CD label if using different architecture) to get for instance KDE installed

Step 1 only required if pkg has not been installed on the machine
  1. pkg install pkg
  2. mount -t cd9660 /dev/iso9660/10_1_RELEASE_AMD64_DVD /mnt
  3. mkdir -p /dist/packages
  4. cd /dist/packages
  5. ln -s /mnt/packages/repos
  6. ln -s /mnt/packages/freebsd:10:x86:64
  7. ln -s freebsd:10:x86:64 FreeBSD:10:amd64
  8. setenv REPOS_DIR /dist/packages/repos
  9. pkg bootstrap
  10. pkg install xorg-server xorg kde
Now this does not get me closer to understanding why a virtualmin backup/restore from CentOS 7 to FreeBSD fails.....