Friday, July 19, 2013

HOWTO get business days between two dates using TSQL

Ok, so I looked around and found varying formulas for calculating the number of business days between two dates and all of them had shortcomings that made them unreliable so I went about making my own.  Now I do borrow code from http://www.kodyaz.com/articles/sql-server-dates-table-using-tsql-cte-calendar-table.aspx  to create my query.  Here is the result:

 DECLARE @TotalWorkingDays INT

 DECLARE @StartDate  DATETIME
 DECLARE @EndDate  DATETIME
 DECLARE @CurrentDate DATETIME
...

SET DATEFIRST 7;

WITH CTE_DatesTable
 AS
 (
   SELECT DATEPART (dw,@StartDate) as [dn], @StartDate AS [date]
   UNION ALL
   SELECT DATEPART (dw,DATEADD(dd, 1, [date])) as [dn], DATEADD(dd, 1, [date])
   FROM CTE_DatesTable
   WHERE DATEADD(dd, 1, [date]) <= @EndDate
 )
 SELECT @TotalWorkingDays =  COUNT([dn]) FROM CTE_DatesTable WHERE [dn] NOT IN (7,1)
 OPTION (MAXRECURSION 0);

 SELECT @TotalWorkingDays


What happens with this query is that it counts the days between the start and end dates excluding Saturday and Sunday (7 and 1 using DATEPART with the dw argument). 

Note: this query does NOT take in to consideration any holidays.

Sunday, May 12, 2013

HOWTO get TiVO daily call and updates working under Solaris 11

I still use my Gen 1 TiVO because I bought it when you could still buy a lifetime subscription. The problem that I ran into when I switched to Magic Jack for phone service was that it was no longer possible to obtain updates because the dial up connection would timeout probably due to a slow data connection. So I setup an old laptop that had a bad HDD and a dead battery to run a live distro of FC which let me use the instructions found everywhere for connecting a gen 1 TiVO to your network using a serial cable (with a null modem) and Linux. Today I ran out of luck as that old laptop finally croaked and that had me wondering if I could have my Ultra 11 step up to the plate and work. Surprisingly, I was able to get everything going after a few hours of "why doesn't this work?" 

Step 1: Get a USB->Serial adapter. 

 I actually had the least amount of problems with this step. I went to Best Buy and, by some miracle, they had an open box/returned Dynex USB->Serial (DX-UDBB9). I came home wondering if I was going to have to go scouring the Internet for obscure drivers to work under Solaris, but, to my complete surprise, it worked as soon as I plugged it in without even needing to reboot. So I thought the next part would be the easiest, but it took some head scratching only because I wasn't familiar with enabling forwarding on the Solaris TCP/IP stack. 

Step 2: Enable setting up pppd on Solaris 

There are two parts to this: 

 a) Enabling forwarding of TCP/IP packets. 
 This part gave me headaches because under Linux it's: echo 1 > /proc/sys/net/ipv4/ip_forward 
Under Solaris, after much searching, I found the obscure equivalent: routeadm -e ipv4-routing -u 

 If you're running a firewall or firewall rules on your Solaris box then you may have to adjust some/all of your rule sets to accommodate this setting. I leave this to you because I don't run any firewall rules on my box since I'm behind a firewall appliance. 

 b) The actual pppd command. 

I haven't created an elaborate SMF service or anything else (yet) so I open a terminal and then execute the following (as root): pppd cua/0 115200 noauth proxyarp nocrtscts nobsdcomp nodeflate persist local lcp-max-configure 28800 asyncmap 0 passive netmask 255.255.255.0 192.168.a.x:192.168.a.y 

Where a is your local number (e.g. 0 for 192.168.0.x) 
x is an unused number on your network (e.g. 253) 
y is an unused number on your network (e.g. 254) 
cua/0 is the /dev on my Solaris box for the USB->Serial adapter. 

If you're in doubt you can launch the Device Driver Utility (located under Applications->System Tools) and look at the devfs path for your serial adapter then see what file under /dev is linked to it. 

Anyone looking for the modifications on the TiVO end of things can look here

Wednesday, March 28, 2012

New Oracle Solaris Studio 12.3 for Solaris 11 Install instructions (IPS)

Oracle has released new instructions for installing Oracle Studio 12.3 using IPS. This method seems to be aimed at eventually pushing users in to requiring a support contract for using the IPS version of Oracle Studio 12.3. For those with a valid support contract the instructions from Oracle are:
  • Visit Oracle Certificate Requests to request an Oracle Solaris Studio certificate - http://pkg-register.oracle.com
  • Per instructions at site, download and install certificate and key on your system
  • Per instructions at site, add the solarisstudio publisher and install Oracle Solaris Studio 12.3

Sunday, January 1, 2012

HOWTO install Oracle Solaris Studio 12.3 (release version) on Solaris 11 11/11 using pkg (not tgz)

Oracle has finally released Oracle Studio 12.3 to the public, but with one persistent gotcha that was present in the Beta: it isn't (yet) available to install using pkg on Solaris 11. I decided to figure out how to unravel the shar for Solaris 10 so that pkg could install 12.3 and it's a lot more difficult than the Beta was. To give an overview of the process you have a shar that contains a giant .jar file inside it. Once you get that .jar then you can unzip it and you will discover a bunch of .class files plus .jar files with names such as data1.jar. These .jar files actually have the IPS files needed for use with pkg.

The first problem that needs to be overcome is getting the main .jar file out of the downloaded shar. The problem here is that Oracle has made the shar so it detects both the version of Solaris being run and modifications to the shar itself. Since the shar is just a giant shell script it's actually very easy to bypass both.

Step 1: Modifying the shar
Open the shar that was downloaded from Oracle with your favorite text editor (after extracting it from the .tgz). Now modify the following:
Line 113: EXTRACT_ONLY=0
to:
EXTRACT_ONLY=1
Comment out lines 229 and 870

run: sh ./solarisstudio.sh

Step 2: Getting and installing the pkg files
unzip bundle.jar
There will now be a directory structure that's a mixture of .class and .jar files. We are only interested in the .jar files. Make a directory (e.g. mkdir ext). Now: cd data ; find . -name *.jar -exec unzip {} -d `pwd`/../ext \;
cd ../ext ; find . -exec pkgadd -d {} \;

Oracle Studio 12.3 will now be installed in /opt/solarisstudio12.3

Monday, December 12, 2011

Notes on upgrading to Solaris 11

This is just a posting about the snags I encountered while upgrading from Solaris 11 Express to Solaris 11 11/11. The biggest problem that I encountered is that I simply could not upgrade using the package upgrade utility. It would install everything fine, but once rebooted grub would complain about a missing kernel (which has a Xen label buried in it). So I decided to try to use Oracle Solaris 11 11/11 Automated Installer. That would be mistake number 2.

The automated installer not only blew away all my partitions, but, I discovered painfully, is missing more than half the packages needed to get X running (note to Oracle: I hate you). My first thought was to download the repo images on the download page and the missing binaries would be on there. No go.

The solution to getting X working on Solaris is making sure your network connection works (at least the automated installer got the config files right - mostly) and using pkg list -a. You will need to install practically everything remotely related to X including the themes and the display drivers (why does an over the wire automated installer NOT do this for me?) before you can get X working. Once you've got the X working you can then leisurely install any and all remaining packages using the graphical installer.

Friday, December 9, 2011

HOWTO install Oracle Studio 12.3Beta on Solaris 11 using pkg (NOT tgz)

The normal installer is broken so installing via GUI is not possible. However, I did some digging and a bit of guesswork which resulted in me finding the solution. The first part of the solution is to extract the installer files from the shar that you downloaded from Oracle (SolarisStudio12.3-beta-solaris-x86.sh in my case) which is accomplished by running: sh ./SolarisStudio12.3-beta-solaris-x86.sh --extract-installation-data .

This will result in 20 different files being unpacked in to the current directory. To install them you need to call them using: pkgadd -d filename. Filename is replace by each of the 20 files such as cc, c++, etc.

Kudos to Tech-Recipes for the pkgadd command. http://www.tech-recipes.com/rx/350/install-a-solaris-datastream-package/

Wednesday, December 7, 2011

HOWTO get Drivel working with Blogger/Blogspot

I was tearing my hair out trying to find the answer to this one because I want/need to use Drivel for posting unless I want to logout of my Google apps account. I couldn't get it going until I found this on the Drivel mailing list (http://mail.gnome.org/archives/drivel-list/2010-July/msg00002.html):
===================
blogger.com does not work as Blogger 2.0, only as blogger 1.0. I've just tested this: http://drivel-dev.blogspot.com/2010/07/another-test-for-blogger-10.html Change to Blogger 1.0, drivel will then select: http://www.blogger.com/api/RPC2 for the server address.
===================
Major kudos to Neil Williams.

Saturday, November 19, 2011

The proper way of having the Broadcom driver load at boot using modprobe

In the Broadcom documentation it mentions to put "modprobe wl" in /etc/rc.local. This strikes me as bad form since hardware detection is done every time you boot. Putting the driver loading in rc.local instead of adding it to modprobe makes it so that any service relying on an active connection won't have one during initial boot, but will after rc.local is run thereby having start up drag on even longer (since all those services will now see an active connection and come alive). A better way is to add the following entry to /etc/modprobe.d/network.conf: install wl0 /sbin/modprobe wl Important note: make sure the wl driver loads cleanly when you manually run modprobe wl. If the wl driver stops working chances are that you updated your kernel which means you'll need to "make clean ; make ; make install" the driver followed by insmod'ing it followed by a depmod.

Friday, August 19, 2011

A quick and dirty HOWTO for getting Broadcom wifi drivers running on Fedora

This is mainly so I remember exactly how to do it since it is a headache :)  Most of this information comes from http://www.broadcom.com/docs/linux_sta/README.txt which has a different procedure that didn't work for me.
NOTE: I would strongly suggest keeping the source directory after you have finished the steps below because you will need to recompile and re-install the module every time the kernel is updated.

1. Download the source for the driver from: http://www.broadcom.com/support/802.11/linux_sta.php
NOTE: There is also a Patch for compilation problem with kernel versions > 2.6.37
NOTE 2: The patch doesn't seem to want to apply cleanly, but since it's only one line that needs to be changed it's not a headache to make the change manually.

2. After extracting the .tgz, but before compiling the source, the include/linuxver.h file needs to be modified.
Add a new line at the end of the file: MODULE_LICENSE("GPL");
Reason: At least with Fedora Core 15 (what I'm using) the kernel will not load tainted modules and this fixes that problem by making the kernel think that this module uses GPL licensed source code.  The code isn't really GPL licensed, but it's not a problem as long as you're not distributing it.

2a. Compile and install the module: make ; make install

3. For all Linux distros it is necessary blacklist Broadcom modules that may be present in your distribution so they will not be loaded when Linux is starting up.  Depending on your distro the exact method may vary, but for FC15 I created /etc/modprobe.d/broadcom-wl-blacklist.conf of which the contents are:

# modules blacklisted for broadcom-wl
blacklist bcm43xx
blacklist ssb
blacklist b43
blacklist ndiswrapper

4. At this point I suggest rebooting (or you could take the long road and unload all the above modules manually).

5. Run: depmod ; modprobe wl

You should now see your wifi card listed when you do ifconfig -a

Tuesday, July 26, 2011

The Solaris package for the mysterious "libgnomebreakpad.so"

Looking through a ton of postings I could only find people complaining about this library with the only solution being given was to copy it manually, but I finally found an obscure posting that pointed out the package: gnome/crash-report/bug-buddy

Sunday, July 24, 2011

INFOSEC that everyone working in IT should know

Note: this is a post I originally put on my FaceBook page in 2009, but I'm slowly migrating away from FB so I'm reposting it here since it's still relevant.
-----------
Seeing as how I'm now moving on again I think I'll offer some basic information security procedures that everyone should know. It's an inevitability that you will eventually have to turn in your work equipment with little to no notice and making sure you don't have personal information on it should be a concern from day one. Yes, storing your gmail, facebook, Twitter, etc passwords in FireFox is convenient, but that's definitely not something that you want left for a stranger to compromise. Here is a setup that I have determined to be best:

1. Load vmware on your system
2. Install a Linux distribution (I prefer CentOS) and make sure to select use an encrypted partition (use a good password too not 1234 or some other password that takes 2 seconds to crack).
NOTE: make sure VMWare is setup to keep the guest in RAM (so it doesn't use the swap).
If the host OS is windows do the following:
1. Install CCleaner and configure it as follows:
a) start at startup
b) secure deletion - DoD standard is more than enough
c) wipe free space
2. Have windows clear delete the swap file at shutdown.
3. Configure disk defragmentation to happen every night at midnight.

Now use the Linux guest to browse gmail, facebook, whatever personal stuff you want/need to do.

The host os (windows) will be you do all your completely business related activities (intranet, code development, etc). As long as a key logger isn't installed the guest os will be secure for using for your personal tasks. When it's time for equipment turn in all that then needs to be done is a quick delete on the VHD for the guest (one file). However, if you're not provided any time you'll at least know that no one will access your personal data unless they have obtained the key for your encrypted filesystem (by key logger or watching you enter it).

Thursday, July 21, 2011

How to setup the updater for Solaris 11

A brief overview is located at:
Support Repositories Explained [ID 1021281.1]
https://support.oracle.com/CSP/main/article?cmd=show&type=NOT&id=1021281.1

Get your x.509 certificate for accessing the repository at:
https://pkg-register.oracle.com/register/status/

There's a HOWTO section link located on the bottom, but I'll reprint the instructions in case things change.
------
How to Install this Oracle Solaris 11 Express Support Certificate

   1. Download the provided key and certificate files, called Oracle_Solaris_11_Express_Support.key.pem and Oracle_Solaris_11_Express_Support.certificate.pem using the buttons above. Don't worry if you get logged out, or lose the files. You can come back to this site later and re-download them. We'll assume that you downloaded these files into your Desktop folder, ~/Desktop/.
   2. Use the following comands to make a directory inside of /var/pkg to store the key and certificate, and copy the key and certificate into this directory. The key files are kept by reference, so if the files become inaccessible to the packaging system, you will encounter errors. Here is how to do it:

          $ sudo mkdir -m 0755 -p /var/pkg/ssl
          $ sudo cp -i ~/Desktop/Oracle_Solaris_11_Express_Support.key.pem /var/pkg/ssl

          $ sudo cp -i ~/Desktop/Oracle_Solaris_11_Express_Support.certificate.pem /var/pkg/ssl
        

   3. Add the publisher:

          $ sudo pkg set-publisher \
                     -k /var/pkg/ssl/Oracle_Solaris_11_Express_Support.key.pem \
                     -c /var/pkg/ssl/Oracle_Solaris_11_Express_Support.certificate.pem \
                     -O https://pkg.oracle.com/solaris/support/ solaris
        

   4. Check your publisher settings, there should be no unrelated mirrors set up. To check for any set up mirrors invoke the following command:

          $ pkg publisher solaris | grep Mirror
        
        

      If the output is empty you are all set. If not remove unrelated mirrors by running:

          $ sudo pkg set-publisher -M http://mirror1.x.com -M http://mirror2.y.com ... solaris
        
        

   5. To see the packages supplied by this publisher, try:

          $ pkg list -a 'pkg://solaris/*'

        

      If you use the Package Manager graphical application, you will be able to locate the newly discovered packages when you restart Package Manager.

Monday, February 21, 2011

VirtualBox SMF

/lib/svc/method/vboxheadless:

#!/bin/sh
# Customise this file to start and stop your application as necessary.

. /lib/svc/share/smf_include.sh


    getproparg() {

            val=`svcprop -p $1 $SMF_FMRI`

            [ -n "$val" ] && echo $val

    }

VM=`getproparg vbox/VM`

    if [ -z $SMF_FMRI ]; then

            echo "Error: SMF framework variables are not initialized"

            exit $SMF_EXIT_ERR

    fi


case "$1" in
  'start') /opt/VirtualBox/VBoxHeadless -s $VM  &
  ;;
  'stop') /opt/VirtualBox/VBoxManage controlvm $VM savestate
  ;;
  'refresh') /opt/VirtualBox/VBoxManage controlvm $VM reset
  ;;
  *) echo "Usage: $0 { start | stop | refresh }"
  exit 1
  ;;
esac

exit $SMF_EXIT_OK


/var/svc/manifest/application/vboxheadless.xml:
<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">

<service_bundle type='manifest' name='vboxheadless'>

<service name='application/vboxheadless' type='service' version='1'>


<method_context>
  <method_credential user='root' group='root' />
</method_context>


<exec_method type='method' name='start'
     exec='/lib/svc/method/vboxheadless start'
     timeout_seconds="60" />

<exec_method type='method' name='stop'
     exec='/lib/svc/method/vboxheadless stop'
     timeout_seconds="60" />

<exec_method type='method' name='refresh'
     exec='/lib/svc/method/vboxheadless refresh'
     timeout_seconds="60" />
<property_group name="startd" type="framework">
<propval name="duration" type="astring" value="transient"/>
</property_group>

<instance name='w7' enabled='true'>
<property_group name='vbox' type='application'>
<propval name='VM' type='astring'
                        value='w7' />
</property_group>
</instance>

<stability value='Unstable' />

<template>
   <common_name>
      <loctext xml:lang='C'>VirtualBox Headless</loctext>
  </common_name>
  <documentation>
      <manpage title='VBoxManage' section='1m' manpath='/usr/share/man' />
      <doc_link name='homepage' uri='http://sgpit.com/smf' />
  </documentation>
</template>

</service>
</service_bundle>


Running VirtualBox in a zone under Solaris 11

When trying to run VirtualBox in a zone under Solaris 11 make sure fonts are installed in the zone or else VirtualBox will core dump.  Package list:

FSWfontconfig-devel-docs                      0.5.11-0.130    known      --o--
print/filter/ghostscript/fonts/gnu-gs-fonts-other 6.0-0.151.0.1   known      -----
print/filter/ghostscript/fonts/gnu-gs-fonts-std 6.0-0.151.0.1   known      -----
system/font/daewoo-misc                       1.0.1-0.151     known      -----
system/font/gnome-fonts                       0.5.11-0.151.0.1 installed  -----
system/font/isas-misc                         1.0.1-0.151     known      -----
system/font/jis-misc                          1.0.1-0.151     known      -----
system/font/misc-ethiopic                     1.0.1-0.151     known      -----
system/font/misc-meltho                       1.0.1-0.151     known      -----
system/font/truetype/arabeyes                 0.5.11-0.151.0.1 known      -----
system/font/truetype/arphic-ukai              0.5.11-0.151.0.1 known      -----
system/font/truetype/arphic-uming             0.5.11-0.151.0.1 known      -----
system/font/truetype/bh-luxi                  1.0.1-0.151     known      -----
system/font/truetype/bitstream-vera           1.10-0.151      known      -----
system/font/truetype/bpg-georgian             0.5.11-0.151.0.1 known      -----
system/font/truetype/dejavu                   2.31-0.151      known      -----
system/font/truetype/fonts-core               1.1-0.151.0.1   installed  -----
system/font/truetype/gentium                  0.5.11-0.151.0.1 known      -----
system/font/truetype/google-droid             0.2010.2.24-0.151 known      -----
system/font/truetype/hanyang-ko               0.5.11-0.151.0.1 known      -----
system/font/truetype/hanyang-ko-core          0.5.11-0.151.0.1 known      -----
system/font/truetype/indic-fonts-core         0.5.11-0.151.0.1 known      -----
system/font/truetype/ipafont                  0.5.11-0.151.0.1 known      -----
system/font/truetype/ipafont-mincho           0.5.11-0.151.0.1 known      -----
system/font/truetype/kacst                    0.5.11-0.151.0.1 known      -----
system/font/truetype/liberation               1.4-0.151       known      -----
system/font/truetype/lohit                    0.5.11-0.151.0.1 known      -----
system/font/truetype/mgopen                   0.5.11-0.151.0.1 known      -----
system/font/truetype/sil                      0.5.11-0.151.0.1 known      -----
system/font/truetype/thai-scalable            0.5.11-0.151.0.1 known      -----
system/font/truetype/ttf-fonts-core           1.1-1           known      --r--
system/font/truetype/unfonts-ko-core          0.5.11-0.151.0.1 known      -----
system/font/truetype/unfonts-ko-extra         0.5.11-0.151.0.1 known      -----
system/font/truetype/unifont                  0.5.11-0.151.0.1 known      -----
system/font/truetype/wqy-zenhei               0.5.11-0.151.0.1 known      -----
system/font/xorg/cyrillic                     1.0.2-0.151     known      -----
system/font/xorg/iso8859-1                    7.5-0.151       installed  -----
system/font/xorg/iso8859-10                   7.5-0.151       known      -----
system/font/xorg/iso8859-11                   7.5-0.151       known      -----
system/font/xorg/iso8859-13                   7.5-0.151       known      -----
system/font/xorg/iso8859-14                   7.5-0.151       known      -----
system/font/xorg/iso8859-15                   7.5-0.151       known      -----
system/font/xorg/iso8859-16                   7.5-0.151       known      -----
system/font/xorg/iso8859-2                    7.5-0.151       known      -----
system/font/xorg/iso8859-3                    7.5-0.151       known      -----
system/font/xorg/iso8859-4                    7.5-0.151       known      -----
system/font/xorg/iso8859-5                    7.5-0.151       known      -----
system/font/xorg/iso8859-7                    7.5-0.151       known      -----
system/font/xorg/iso8859-8                    7.5-0.151       known      -----
system/font/xorg/iso8859-9                    7.5-0.151       known      -----
system/font/xorg/xorg-core                    7.5-0.151       known      -----
system/library/fontconfig                     2.8.0-0.151     installed  -----
system/library/fontconfig/documentation       2.8.0-0.144     known      --r--
x11/font-utilities                            7.5-0.151       installed  -----
x11/library/libfontenc                        1.0.5-0.151     installed  -----
x11/library/libxfont                          1.4.1-0.151     installed  -----
x11/xfontsel                                  1.0.2-0.151     installed  -----

Monday, November 15, 2010

The Scientist and Engineer's Guide to Digital Signal Processing By Steven W. Smith, Ph.D.

Currently available at no charge on http://www.dspguide.com/ I've mirrored this complete guide as it is a must read.  Major kudos to the author.

DOE Fundamentals Handbook: Electrical Science (Vol 3 of 4)

I found this interesting read while cleaning up the hard drive (I have an avalanche of junk I'm getting rid of).  More stuff to emerge soon.

UPDATE: The first try was using a link to my Google Apps account (which didn't work).  This should work fine.

Friday, November 5, 2010

Blogger Integration

I wish Twitter would accept the RSS feeds from Blogger.  I'm starting to really get in to Solaris and have other projects that I'm going to be working on.  I found out that Facebook takes RSS feeds from Blogger.

Thursday, November 4, 2010

Getting Apache 2.2 working under Solaris using SMC

Don't ask me why I did this (it was painful), but I got Apache 2.2 running on Solaris 10 using the SMC instead of the default pre-fork model.  Results to be figured out later.  Anyway, for those interested here are the relevant files.  For those curious I do use zones and this is in one:

[/lib/svc/method/apache22]

#ident  "@(#)apache22        1.1     08/04/30 SMI"

. /lib/svc/share/smf_include.sh

# SMF_FMRI is the name of the target service. This allows multiple instances
# to use the same script.

getproparg() {
        val=`svcprop -p $1 $SMF_FMRI`
        [ -n "$val" ] && echo $val
}


PIDFILE=/tmp/apache.pid
APACHEBIN=`getproparg apache22/bin`
APACHEDATA=`getproparg apache22/data`


if [ -z $SMF_FMRI ]; then
        echo "Error: SMF framework variables are not initialized"
        exit $SMF_EXIT_ERR
fi


if [ -z $APACHEDATA ]; then
        echo "Error: apache22/data property not set"
        exit $SMF_EXIT_ERR_CONFIG
fi

case "$1" in
'start')
pidd="PidFile /tmp/apache.pid"
$APACHEBIN/httpd -f ${APACHEDATA}/conf/httpd.conf  -C "PidFile /tmp/apache.pid"
        ;;

'stop')
pidd="PidFile /tmp/apache.pid"
        $APACHEBIN/httpd -f ${APACHEDATA}/conf/httpd.conf -k stop  -C "PidFile /
tmp/apache.pid"
        ;;

'refresh')
pidd="PidFile /tmp/apache.pid"
$APACHEBIN/httpd -f ${APACHEDATA}/conf/httpd.conf -k restart -C "PidFile /tmp/ap
ache.pid"
        ;;

*)
        echo "Usage: $0 {start|stop|refresh}"
        exit 1
        ;;

esac
exit $SMF_EXIT_OK



[/var/svc/manifest/application]

<?xml version="1.0"?>
<!DOCTYPE service_bundle SYSTEM "/usr/share/lib/xml/dtd/service_bundle.dtd.1">
<!--
 Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
 Use is subject to license terms.

 ident  "@(#)apache22.xml  1.1     08/04/30 SMI"

        NOTE:  This service manifest is not editable; its contents will
        be overwritten by package or patch operations, including
        operating system upgrade.  Make customizations in a different
        file.
-->


<service_bundle type='manifest' name='apache22'>

<service
    name='application/web/apache22'
    type='service'
    version='1'>

<!--
Wait for network interfaces to be initialized.
-->

    <dependency
        name='network'
        grouping='require_all'
        restart_on='none'
        type='service'>
        <service_fmri value='svc:/milestone/network:default' />

    </dependency>

<!--
Wait for all local filesystems to be mounted.
-->

<dependency
    name='filesystem-local'
    grouping='require_all'
    restart_on='none'
    type='service'>
    <service_fmri value='svc:/system/filesystem/local:default' />
</dependency>

<exec_method
    type='method'
    name='start'
    exec='/lib/svc/method/apache22 start'
    timeout_seconds='60' />

<exec_method
    type='method'
name='stop'
exec='/lib/svc/method/apache22 stop'
timeout_seconds='60' />

<instance name='apache22' enabled='false'>

    <method_context>
    <method_credential user='root' group='root' />
    </method_context>

    <property_group name='apache22' type='application'>
        <propval name='bin' type='astring'
            value='/opt/httpd22/bin/' />
        <propval name='data' type='astring'
            value='/var/httpd22/' />
    </property_group>

</instance>

<stability value='Evolving' />

<template>
    <common_name>
        <loctext xml:lang='C'>
            Apache 2.2 httpd
        </loctext>
    </common_name>

    <documentation>
        <manpage title='Apache 2.2' section='1' />
        <doc_link name='apache.org' uri='http://httpd.apache.org/docs/2.2/' />
    </documentation>
</template>

</service>

</service_bundle>

Tuesday, December 8, 2009

Just starting out

Well, I've been an avid commentator on Facebook, MySpace, Twitter, Digg, and more, but they all have their drawbacks so now I'm standing up a blog here hoping to cut out the problems that each have.