Here is a patch for the cnt5064 install script which adds a '-y' switch to the command line. The switch bypasses all the user prompts and just installs all the toaster packages. Its been pretty handy in all the testing and rebuilding I have been doing on a new toaster.

diff -Naur /usr/src/qmt-install/cnt5064-install-script.sh.orig /usr/src/qmt-install/cnt5064-install-script.sh

--- /usr/src/qmt-install/cnt5064-install-script.sh.orig 2008-06-03 10:41:51.000000000 -0400 +++ /usr/src/qmt-install/cnt5064-install-script.sh 2008-06-03 11:05:20.000000000 -0400
@@ -16,6 +16,9 @@
 # Updated for new toaster packages by Nick Hemmesch
 # April 14, 2007
 #
+# Added -y switch to install all packages without user intervention by Lee R. Copp
+# June 03, 2008
+#

 VQAD=vqadmin-toaster-*.src.rpm
 VPOP=vpopmail-toaster-*.src.rpm
@@ -42,7 +45,11 @@

 ##
 # Ask to proceed or exit
-inquire(){
+inquire()
+{
+  if [ $ATP = 1 ]; then
+    PROCEED=y
+  else
     PROCEED="exit";
     echo -n "Shall we continue? (yes, skip, quit) [y]/s/q: "
     read REPLY
@@ -57,6 +64,7 @@
        echo "Exiting."
        exit 0
     fi
+  fi
 }

 ##
@@ -66,11 +74,31 @@
     exit 1
 fi

+ATP=0
+while getopts "y" optname
+  do
+    case "$optname" in
+      "y")
+        ATP=1
+        echo "---All toaster packages selected for install---"
+        ;;
+      "?")
+        echo "Unknown option $OPTARG"
+        ;;
+      ":")
+        echo "No argument value for option $OPTARG"
+        ;;
+      *)
+      # Should not occur
+        echo "Unknown error while processing options"
+        ;;
+    esac
+  done
+
 DISTRO=cnt5064
 ARCH=x86_64
 BDIR=redhat

-
 echo ""
 echo "Installing daemontools-toaster . . ."
 inquire



patch /usr/src/qmt-install/cnt5064-install.script.sh < cnt5064-install-script.sh.patch

--
Lee R. Copp
Project Engineer (EE/ME)
http://www.michsci.com/

---------------------------------------------------------------------
    QmailToaster hosted by: VR Hosted <http://www.vr.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to