Windows XP Embedded and GPO settings

Posted on Monday, 19th May, 2008 in Life

We’re currently having a weird issue (which we had before); the Windows XP Embedded powering our Wyse V90’s isn’t applying any GPO settings if you log on with a user that has a configured profile.

Googling (is that a valid word yet ?!) for it, only resulted in one useful link, which is apparently a guy with the exact same problem … *shrug* I’m completely out of ideas by now, as I don’t even have a place to start (as in where the reason might be located).

Well, I do have a place to start with (that’s the local Events Viewer), which indeed lists some errors, but only such errors which ain’t making any sense. For example I see this:

  • Userenv:1086 - “Windows cannot do loopback processing for downlevel or local users. Loopback processing will be disabled.
  • SceCli:1704 - “Security policy in the Group policy objects has been applied successfully.
  • Userenv:1085 - “The Group Policy client-side extension Folder Redirection failed to execute. Please look for any errors reported earlier by that extension.

Getting a FC HBA to rescan it’s attached devices

Posted on in Life

If you’re using a 2.6 based distribution, the FC HBA (or more correctly the corresponding driver) should create entries in /sys/class/scsi_host. Now you only need to get the host-number (basically the # of the host bus adapter) and you can get started ..

Simply doing this, is going to tell the FC HBA “rescan” and discover new devices ..

1
$ echo "1" > /sys/class/fc_host/host/issue_lip

That should do the trick, and you should be able to get udev to recognize the new devices attached via FibreChannel without the need to reboot the whole box (which might be a bit tricky).


patch2mail for SLES10

Posted on Monday, 21st April, 2008 in Life

Well, there is this “nifty” tool called patch2mail, which basically converts the XML for the updates to a more readable format. But you’re screwed if you want to do the same on SLES10. Since it ain’t shipping with the zypper xml wrapper thing, you need to do it a bit different.

So I ended up writing a small (and yet, ugly) shell script to generate me a mail of my liking ..

TO="admin-addr@localhost"
CLASSES="security recommended optional"
 
# Temporary files
ZYPP_LIST="$( mktemp /tmp/zypper-list.XXXXXX )"
ZYPP_DETAILS="$( mktemp /tmp/zypper-details.XXXXXX )"
TMP="$( mktemp /tmp/zypper-report.XXXXXX )"
zypper pch 2>/dev/null > $ZYPP_LIST
 
# Figure out how much updates are still pending
PENDING="$( cat $ZYPP_LIST | grep "| Needed" | wc -l )"
 
if [ $PENDING -eq 0 ] ; then
  exit 0
fi
 
echo > $TMP
echo " Pending updates for $( domainname -f ) on $( date )" >> $TMP
 
for severity in $CLASSES; do
  PACKAGES="$( cat $ZYPP_LIST | egrep "${severity}(.*)\| Needed" | \
    cut -d\| -f2 | sed "s,^ ,," )"
  echo
  echo "  Category: $severity"
  for package in $PACKAGES; do
    zypper patch-info $package 2>/dev/null > $ZYPP_DETAILS
    echo "  * $package ($( cat $ZYPP_DETAILS | grep "Version: " | \
      sed "s,Version,version," ))"
    echo "    $( cat $ZYPP_DETAILS | grep "Summary: ")"
    echo "    $( cat $ZYPP_DETAILS | grep "Reboot Required:" )"
    echo
  done
  echo
done >> $TMP
 
cat $TMP | \
  mail -s "[$( date +%F )] Update report for $( domainname -f )" $TO
trap 'rm -f "$TMP" "$ZYPP_LIST" "$ZYPP_DETAILS" >/dev/null 2>&1' 0
trap "exit 2" 1 2 3 15
 
# vim: set tw=80