Wednesday, August 12, 2015

Updating Adobe Flash Player with batch files and SCCM 2012

I've been faced with updating a lot of (to me) computers with the current version of Adobe Flash Player due to the recent vulnerabilities in Flash. I haven't found a good way to be notified of a new release, so my browser is now set to open a tab with the version of Flash available.

Of the over 4000 Windows computers I am attempting to keep updated, over 90% have Adobe Flash Player installed, with either the ActiveX or NPAPI version installed (or both). I'm using SCCM, so I deploy Flash Player as a MSI package. And it seemed like I would deploy an update, then a new vulnerability and update would crop up, so a new deployment/upgrade cycle began again. I'm not fond of this Flash Update Ouroboros so I wrote a script to simplify things.

First, the script for ActiveX:

@echo off
REM Run via SCCM against collection of devices with old Flash Player ActiveX

:VERSION
REM set current Flash version
SET CurrentVersion=18.0.0.232
SET CurrentMajorVer=18

:GRACEFUL_UNINSTALL
REM attempt to gracefully uninstall Flash
wmic product where "name like 'Adobe Flash Player%%ActiveX' AND NOT version like '%CurrentVersion%'" call uninstall

:INSTALL_CURRENT_FLASH
REM install current Flash from distribution point
%Comspec% /c msiexec /i "\\server\software\FlashPlayer\%CurrentVersion%\install_flash_player_%CurrentMajorVer%_active_x.msi" /qn

:END

Next, the script for NPAPI Plugin:

@echo off
REM Run via SCCM against collection of devices with old Flash Player Plugin

:VERSION
REM set current Flash version
SET CurrentVersion=18.0.0.232
SET CurrentMajorVer=18

:GRACEFUL_UNINSTALL
REM attempt to gracefully uninstall Flash (old versions "Plugin" new ones "NPAPI")
wmic product where "name like 'Adobe Flash Player%%Plugin' AND NOT version like '%CurrentVersion%'" call uninstall
wmic product where "name like 'Adobe Flash Player%%NPAPI' AND NOT version like '%CurrentVersion%'" call uninstall

:INSTALL_CURRENT_FLASH
REM install current Flash from distribution point
%Comspec% /c msiexec /i "\\server\software\FlashPlayer\%CurrentVersion%\install_flash_player_%CurrentMajorVer%_plugin.msi" /qn

:END

The only real difference is the Uninstall and Install section to reflect ActiveX vs Plugin. The script uses WMIC to look for any Flash Player that is installed but not current, uninstalls it, then installs the current version based on the variables set in the script. Assuming you create the folder with the version number and the current packages, the script can be edited and used to update computers quickly.

On a higher level, I'm using System Center Configuration Manager to limit my collection of devices so I am only running the updates on the computers that need it (that would be an entire other post). While I think that you could just use a GPO to push this, be aware that all systems would end up with Flash Player installed even if it didn't have it installed before. By targeting only the systems that already have Flash Player, I am updating computers but not increasing my vulnerability surface area.

Naturally, I considered installing an update server, but I haven't figured out Adobe's documentation on this. For now, this batch file does the job for me.

To update your packages and script when Adobe releases a new Flash Player,

  1. create a new folder named after the current version on a distribution server (i.e. \\server\software\FlashPlayer\18.0.0.999)
  2. download the Adobe Flash Player distribution packages (sign up here) via your custom URL obtained from your Adobe Distribution Agreement email and put them in the folder you just created, and
  3. update the "CurrentVersion" and "CurrentMajorVer" variables in the batch files, then
  4. deploy.
Enjoy. The lack of additional explanation is mainly due to my intention to remind Future Me what I was doing when I forget my methodology and to give other IT guys a starting point for ideas on updating Flash Player en masse.

Tuesday, April 08, 2014

XP End-Of-Life, What It Means and How It Affects You

UPDATE: 04/28/2014 - if you haven't yet, stop using Internet Explorer (IE) immediately. There's a serious security flaw in IE and XP computers will not be patched. If you want the Microsoft mumbo jumbo, read this and this.

People still running Windows XP and have Automatic Updates turned on will receive the warning that XP is no longer supported. I've gotten several messages from people expressing varying degrees of concern.

What It Mean that XP has reach End of Life (EOL)

  • If you are still running Windows XP, it basically means it is really time to upgrade if you have the funds. XP has been around for 12 years, so you're not getting the best of the Internet any more.
  • It means Microsoft will no longer provide security updates or technical support for Windows XP. So, if there is a security concern (like the recent OpenSSL Heartbleed Bug), there's no updates to protect you from hackers (Oh Noes!).
  • It means no more updates to Internet Explorer, Microsoft Security Essentials and likely other applications like web browsers. That may very well mean that web sites like Facebook just won't look right down the road on your computer.

What It DOESN'T Mean

  • Your XP computer is not going to stop working. It'll keep doing the same things it was doing last week.
  • Your XP computer is not going to suddenly get hacked. You're no more vulnerable than last week.

An Analogy

Let's say you have an old car named Windows XP. I don't mean a 1965 Ford Mustang, more like a 1972 Ford Pinto. XP's End-Of-Life is like Ford declaring that they will no longer manufacture parts, honor any safety recalls, or for that matter service them at dealerships. You can still put gas in it, drive it around, do oil changes, etc. Your Pinto will still keep running, but when it breaks, that's the end. Windows XP is like that Pinto, it'll keep driving, but you can't find parts.

So, What's the Bottom Line?

Seriously, time for a new computer. Or, get a nice tablet and you may find that it's an adequate replacement for your old XP computer. But don't freak out.

If you must keep using your XP computer, get a different browser and keep your antivirus software up-to-date. I would recommend you stop using Internet Explorer and use Google Chrome instead. Google has promised to keep Chrome running on XP until April 2015.

Tuesday, March 25, 2014

After my SECOND run

I went running for the first time on Saturday, and when I got home Monday I had a strange desire to go running again. I had planned on running Tuesday, Thursday, and Saturday, so I would have had one more day, in theory, before my next scheduled run.

Honestly, I didn't feel all that great on Sunday. My muscles ached, things hurt that have never hurt before, and I discovered butt muscles I didn't know I had. I wasn't exactly looking forward to Tuesday on Sunday. But, somehow, I wanted to go running.

My wife has been very supportive. I asked her to go to Target and get some Champion C9 shorts, and she came home with two pairs, two shirts and a tank top. Maybe it is her supportive attitude, but for some reason I just wanted to run on Monday.

Fear may have been a motivation. I didn't feel that great on Sunday, and I didn't want to stop running. So, I donned the running tee and shorts my wife bought me, put on the shoes she had brought home for me, and went out the door.

Two applications were monitoring me on my phone as I planned. Runtastic stopped at one point and I had to start it back up, and on the return leg Runkeeper announced that my task was complete and I couldn't continue it. The thinner material seems to allow the phone to interact with my leg and I probably shut off the apps while running. Oh well, time to get an arm band.

Fatigue set in differently this time. I ran a bit further, which probably meant I ran too fast for my own good. "Train, not strain" is what I read, but I am still learning. On the way back, I felt that the going was harder, and I leaned heavily on the motivation of Runkeeper's interval announcements. When Runkeeper stopped, well, keeping for me, it was a hard blow.

Nevertheless, I ran for what I thought might be 60 seconds (which goes VERY quickly) and walked for a brief span, then repeated. It was hard, struggling up the slope on the way home, and I thought to myself, "Why oh why did I pick a route that has me running uphill on the way home?!?"

Annoyingly, Runtastic recorded exactly NOTHING for my run. Runkeeper kept my partial workout, so I have no idea how well I did. I suppose it doesn't matter - I'm just going to go running again on Wednesday.

Oddly, I do not feel the pain today (after two runs) the way I did the day after my first run. Hm.

Saturday, March 22, 2014

After my first run

So I went for my first run. I'm not getting younger, and running seems accessible to me. Some friend pointed me to Couch to 5K, so I'm following that plan. Here are some reactions after my first run.

Pants: I need better pants. Running in the shorts I wear casually will do for now, but it seems there would be a better solution. I will look into that.

Shoes: Boy am I glad Cathy bought me a pair of running shoes! My regular tennis shoes (are they actually for playing tennis?) would have felt very heavy.

Apps: So far I like RunKeeper. I found it fairly easy to replicate my Week 1 routine for Couch To 5K. The prompts for the intervals during the run were very, very helpful. I also used Runtastic Pro, but I have no reactions on that yet. Next time I run, I'll still use both, but I'll keep Runtastic Pro up front to see how it works. Based on today, however, I'm still going to use RunKeeper's intervals, and likely get the subscription. For some reason, Runtastic posted to Facebook but I missed that in RunKeeper. Hm...

Pockets: What do other people do with their phones and water? My phone was bouncing around in my pants the entire run. I left the water bottle behind and just drank as much as I could before doing the warmup walk. That might explain those armband phone holders I see for sale, but what about water?

The Run: At the beginning of the run, I was preoccupied with keeping track of my running intervals. RunKeeper took care of that, and I found it possible to just focus on running. I say focused because I concerned myself with my posture, with trying not to run too fast, and my footfalls. Many times I found myself thinking I would fail the "Talk Test" and tried to slow down a tiny bit. My run became 60 second and 90 second experiences, and it started without incident.

I had set an alarm for 10 minutes so I would know when to turn around. When that turn-around alarm went off, I finished the running interval and started walking back. Suddenly, the distractions of the app, the intervals, and dodging power poles gave way to a sense of joy. A smile took over and I thought to myself, "I can actually do this!" It was briefly euphoric, and the possibility of running as a lifestyle choice seemed real.

RunKeeper brought me back down to earth by announcing that my next running interval was upon me, and a mild fatigue creeped up behind me and chased me the rest of the way home. My joy was now tempered by the reality that running is going to take effort and time. On the way back, every time I heard that next interval of a one-minute run, I sighed and picked up the pace.

I got close to home when the apps announced that I had finished my workout. I walked briskly from the street to the our rig and paced around a bit to let my breathing return close to normal, and called it my first step in the journey.

How I feel now: I feel a little accomplishment, but I also feel like nothing changed. I sense a bit of reaction from some of my muscles, which surprisingly is not limited to my legs. I read somewhere it is better to warm up instead of cold stretches before a run, but I'll need to look into that some more.

I've decided on running Tuesday, Thursday, and Saturday. That seems reasonable, even though I have no reason to select those days. I saw the other runners, so I may look into a better time of day to run, or a better location. Perhaps there are no runners living around here but that seems unlikely.

So that's it. My first run!

Tuesday, March 04, 2014

Some Thoughts On Other People's Children

Cathy and I do not have children. I do affectionately refer to my cats and dog as our "furkids", but there is no denying that I will never understand the joys or heartaches of having offspring of our own.

To say that I have made my peace with it would be to imply a loss I do not experience. Some feel that childlessness is a state to be pitied; however, as I have no existential reference point, I simply do not feel any sense of deprivation or loss.

As is normal, we have plenty of friends with children. I can think of several such friends that would, should I envy the prospect of parenthood, cause me to be both immeasurably happy for them and deeply disturbed by my own lack of parity. Some friends make parenthood look (almost) easy, but I believe that is simply a lack of perspective on my part.

The cries of neither the tribulations nor the triumphs of our offspring will be heard in our home. Instead, Cathy and I experience slivers of parental joy by offering to watch the kids while our friends actually have a date night, or perhaps attend a function or work late or some other important reason.

Some joy can be derived vicariously from being a parental stand-in. We even have friends who are trusting enough, or perhaps possessing the required senses of humor, to allow me participation in the changing of diapers, getting kids bathed and teeth brushed before bed, and other less-than-glamorous activities. Bedtime stories were a joyful discovery; I actually enjoy reading bedtime stories to children. As I have the luxury of being the non-parent, I suspect I receive a little bit of leniency and good behavior from the children, and I reciprocate by being slightly less stern as their parents would in the course of an average day.

From time to time, the apparent lack of children in our lives comes up in conversation. This is a natural phenomena, and all of our acquaintances go through this process. Once biological children are ruled out, the option of adoption is usually suggested, along with observations about our obvious fitness to be extraordinary parents.

Generous, optimistic projections of how our potentially adopted children would change the world aside, I do not believe I would make a great father. Sure, no father is perfect, but make many sacrifices to have children and to guide them to adulthood. I do not think I could be half the dad my own father was, and at 40, I simply have never faced the need to deprive myself in the ways I think a child would deserve.

Rushing to my defense, our friend point out how we provided for Cathy's mom for over a decade, or how we have sent (a not-insignificant amount of) money to my mother to support her since my father's death. Duty, love and obligation are entwined in my mind regarding patently. Children require sacrifice. Sacrifice is not something I am accustomed to making, and though I would learn, parenthood is not a state of affairs I find myself in nor desiring to enter into.

Biological imperatives, often couched in the creation mandate, do not sway me to have children. If the command to be fruitful and multiply has not yet been met, then I am a monkey's uncle. That said, I do think that it is normal and desirable for a society to have a steady state of population. Nonetheless, I so not think every couple needs to have children, nor do I think that it is a requirement of a marriage. Children need parents, but married people do not have to be parents.

Children are a gift, and when would-be parents spurn that gift, adoption is a beautiful solution to an intractable state of affairs. Parenthood should, from my limited and experience-free perspective, reflect the way God treats all His children. That is a task too high for me, and as we cannot have biological children of our own as a couple, I assume that God has something else in mind for us. Adoption may not be it, either.

We have friends who have adopted, and acquaintances who have done so as well. Some adopt to fill a need of the world, for they have more room in their hearts to welcome children without a home of their own. Others have adopted to fill a need of their own, and just as eating and sleeping are needs, some rightfully need to be parents, and there may be some beauty when children need parents who need them as well.

Adoption, as a notion, gives me the tingles. To understand why I get that tingly feeling, you'd have to hear my thoughts on human depravity and redemption, and perhaps be a little surprised of how little I think of myself. But I'll try briefly...

The very thought of God adopting us, to make the untouchable cherished, to truly redeem something not merely useless but repulsive, is (in a word) just AWESOME. God's love fills me with wonder and it terrifies me. That is what adoption means to me.

Adoption is (should be?) deliberated parenthood. I doubt most natural parents have any idea what they are really getting into with their first child, but good parents are deliberate in undertaking the task. I like to think we know some good parents, who perhaps upon reading this would not think of themselves but should, for they demonstrate God to their children regularly. God's example should inform everything from discipline to recreation, but I remain the opinionated man without children.

Cathy and I neither need children nor feel "called" to parenthood. What I had believed I felt was a calling to be pastor, a cash-poor one at that, and being childless made sense back then. Now I do not know why, but I am comfortable with it. Should we ever have children, it would be a task requiring much grace from a loving God who is willing to give it, so while I would find the prospect awesome, it would be a great privilege and adventure.

Tuesday, February 18, 2014

Thoughts on the prospect of living with my mom

Cathy has long known that I hope to one day move my mother stateside to live next to me. I have some dreams and some concerns on how this may work out.

We have lived in a triplex before and that worked well for us. I can envision purchasing a triplex or a quad, with Cathy and I in one unit, my mother in another, and Rhona and Dave (Cathy's mom and her husband) in the other. One big happy family, but each with their own space. I would convert a space for Cathy's studio, and life would be perfect.

I don't think we could pull this off financially, except that my mom has two sources of retirement income and would be willing to help, like praying rent. Rhonda and Dave would do the same, so our payments on the property should be quite manageable.

California is just too expensive. I would love to enjoy all that the Golden State has to offer, except the taxes and the deficit. Perhaps the Joneses would have to move to somewhere like Georgia. My employer has an office and they were quite positive about the prospect of a transfer. Dave already wants to move there and Cathy has family out there. I would simply acclimate.

Culturally, Cathy and I would learn to fit in, and we would have help from family. I am mostly concerned with climate and finances. I think we are spoiled by California's temperate seasons, and real weather and seasons would take some getting used to. However, I think we are up to the task.

Very little of concern has crossed my mind in regards to living with Rhonda and Dave. After all, we lived with Cathy's mom in our house for 10 of the first 12 years of our marriage. We got along. Dave takes good care of her, and he is a good man.

Most of my concerns stem from my mother's expectations of living with me, as I do not believe she realizes that I, her son, am American. That may sound strange, but though I grew up in Taiwan in a Chinese culture and environment, my mother had far less influence on me than my late (and great) father. My father took great care in preparing me to go home to America; I do not think he intended for me to stay in Taiwan, as he always spoke of my presence there as visits. I wish he had moved back here with my mother, but dad loved her too much to take her away from a familiar and stable life.

Common practice among American families is for the patents to prepare for their own retirement. My dad did so to some extent, and my mother has always relied upon my father's plans. He did not intent to die so soon, as his plans assumed my mother's eligibility for social security. We did get that all sorted out, but it was not an easy couple of years, particularly for my mother.

Common practice among the Chinese people of Taiwan is for the parents to move in with the children. Further back, it was multi-generation families, where the son builds an addition to the shared structure of the growing house for his new family. Now, with land at a premium, parents move in with a child. I joke about how the Chinese 401(k) plan is to have four or more children. Unfortunately, my mother's portfolio is not very diverse, so we find ourselves with a single long-term investment.

Although I consider myself a Chinese American, the "Chinese" part is the modifier, and "American" is the primary aspect of my national, cultural identity. Sure, the Chinese part is important, but it isn't as important as I believe my mother likely thinks.

If she is to move here and live with us, my mother will need to understand that she'll be living with her American son and his American wife. We will need our own space, and while I would see her almost daily, my life will not revolve around her. And, as an American male, the thought of having two women trying to share a kitchen (again) is simply off the table; it didn't work with Cathy and her mom, so it certainly isn't going to work with her foreign mother-in-law.

Within the landscape of my mother's imagination, I believe she envisions living in the same house, walking the same halls, and sharing every meal with me. When she speaks of the future, she does not picture Cathy, merely how mom and I will relate to each other, with Cathy in the backdrop of the scene. Those who know me know that Cathy and I are rarely separated. It is of growing concern that my mother has had no way to learn of this or experience this, and she does not seem to grasp it when I tell her in letters and photos.

A language barrier has grown quietly but steadily over the years between my mother and myself. My Mandarin is not what it used to be as those language and vocabulary muscles have atrophied. My mother's somewhat limited English has begun to deteriorate in my father's absence. Particularly challenging is the fact that I have only lately come to this realization. Without my father to mediate and bridge the gaps of our communication, my mother and I say less and less that the other actually understands.

We have perhaps two years (three tops) of time to prepare for my mother's intersection with our life. I must find a way to make clear what our new arrangement may entail, the commitments I am willing to make and what I am unwilling to sacrifice. How shall I get an accurate picture of what mom expects, and how do I best honor her in her old age? I do not know, but I believe I shall pray for inspiration. And I suppose I should begin brushing up on Chinese.

Monday, February 17, 2014

Some Thoughts On Registering a Expiring Domain Name

I have never tried to grab an expiring domain before, so here are some thoughts on the matter. I do IT stuff for family, friends, and non-profit organizations like churches (especially those I attend). Commonly, those making decisions about an organization's web site do not know how web sites work, so sometimes we go off in a direction and have to backtrack.

Suffice it to say that a new church plant registered one domain name specific to a region, but then saw indicates it may be too specific. We went from "Church Name At City" to "Church Name at City and City" to "Church Name (at city and city)".

Unfortunately, I had registered ChurchNameAtCity.TLD as requested, and as ChurchName.TLD was taken I could not register it as well. But as Providence would have it, several day ago I decided to do a WhoIs lookup on ChurchName.TLD, and found that it was already PendingDelete.

Back when I was told to register our domain, ChurchName.TLD was three months from expiration, and I had no reason to think it would expire. My WhoIs lookup of ChurchName.TLD showed this:

Updated Date: 2014-02-11T11:07:05Z
Domain Status: pendingDelete

I did some Google searches and found that there are no hard-and-fast rules on what a domain registrar may do once a domain expires. However, once it enters PendingDelete, then six days after the "Update Date" the domain is released for registration or auction.

First, the time was in "Z" or Zulu time (that is, GMT). I did the math and realized that six days from the would be a little past midnight my time on 2/17.

Second, I considered the possibility that the original registrant just messed up. Also, if I contact them, even if they don't have the church they may keep the domain. And how would I feel if someone snatched my own domain from me while I was on a missions trip? So I looked on Google, Facebook, and yellow page entries for a church at the registrant's address. I found that the Facebook page had been closed and merged with a school page, the church was listed as closed on a review and on Foursquare, and that the registrant is now the pastor of a different church (with a functioning web site). I concluded that the domain is fair game.

At this point, I considered using a domain purchase service, or a domain auction service.  The TLDs I was most interested in were .ORG and .NET, but I would bundle .COM and .INFO to be thorough. I looked up registrant information on all the domain names were minor permutations, and found that most of the relevant ones were registered by one person.

I considered the possibility that too many WhoIs lookups may make some domain parking service grab the domain I am interested in acquiring. So I used my go-to registrar and tried to register it at 00:08 on 2/16 my time, and it wasn't available.

Yes, that wasn't six days, but since there were no hard-and-fast rules, I figured I would play it safe. Again, I though about using a domain acquisition service, but didn't want to spend the money.

I tried registering again at 06:08 on 2/16, then 00:08 and 00:15 on 2/17, then 06:08 on 2/17. It was STILL not available, but the registrant hadn't changed.

Briefly, I flirted with acquiring .Org and .Net with a domain service, but dismissed it again. I tried registering at 15:00 on 2/17 and found a curious result... most of the ChurchName.TLD domains were available except for .Com and .Org. I watched .Org change registrants twice in 15 minutes, then it seemed to settle on NameBright.com. That makes me think that a registrar or a service acquired that domain moments before I was able to do so. And, the .Org domain was registered by someone in Japan. So, I got ChurchName.Net and .Info, but not the .Org I wanted (and not the .Com I would just park).

I had also kept an eye on TheChurchName.TLD, and I was able to acquire all the TLDs I was interested in for TheChurchName, so I did. It is now likely that I will push the church to use TheChurchName.TLD instead.

Would I have acquired ChurchName.Org if I had used a service? I cannot know for sure, but had I spent the $60 per domain name, I have spent at least $120, maybe $240, and I got all but one of the desired domain names without paying the fee. I would have like to sit on ChurchName.Org and .Com, but frankly if someone else has a real use for it, I would rather it be in the wild.

If there is an expiring domain name I really, really want, I'll probably try the auction service next time. Otherwise, I'll just keep trying to register it on day 6 every few minutes or so.

Wednesday, December 12, 2012

Wednesday, October 24, 2012

Hey fellow Christian, be like this, please?

Too often, the world sees Christians as judgmental jerks. Frankly, I know a lot of judgmental jerks that declare they are Christians and I would rather not have anything to do with them. To the rest of the world, this is what these Christians look like:
I know that God is both love and justice, but maybe it is time we emphasize God's love, and let God point out the sin in our lives and the lives of others. Ideally, it'd be more like this:
Why do Christians forget that God loves the lost? That Jesus "came to seek and to save the lost"? God loves the sinner, the broken, the prostitutes, the tax collector, the ones "we" despise. And do you know whom God does, in fact, judge harshly? The self-righteous, religious jerks. I'm a Christian, but sometimes I don't like other Christians, and wonder if they are Christian in name only.

Images from Tatsuya Ishida's Sinfest webcomic.

Saturday, October 01, 2011

Persistent USB mount locations on Pogoplug (and other Linux devices)

In a previous post, I talked about how I set up rsync on my Pogoplug Biz for church. I had mentioned a Couple of “Gotchas”, such as the way USB drives may be a different device name upon reboot. This makes it hard to find the Optware drive consistently. Here is my solution.

Basically, you want to get the e2fs libraries and programs, then use blkid and findfs to locate the drive. As of Oct 2011, the links below are correct, but be sure to check http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/ and replace the file names as necessary.

The commands below will download and copy the necessary libraries and e2fs utilities for mounting your flash drive in the same location. I am assuming you are going to use the device UUID instead of the drive lable to locate the drive, but both are possible. I also assume that you want to modify the NAND (the Pogoplug internal flash drive) as little as possible. I am ONLY copying the files necessary for this task of finding and mounting specific USB drives to specific locations upon reboot.

Getting the e2fs libraries and utilities


cd /tmp
wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/e2fslibs_1.41.14-1_arm.ipk
tar xvzf e2fslibs_1.41.14-1_arm.ipk
tar xvzf data.tar.gz


wget http://ipkg.nslu2-linux.org/feeds/optware/cs08q1armel/cross/stable/e2fsprogs_1.41.14-1_arm.ipk
tar xvzf e2fsprogs_1.41.14-1_arm.ipk
tar xvzf data.tar.gz


Copying the e2fs files to the internal flash memory
The following command makes it possible to change the Pogoplug flash memory, so be careful from here on out! Also, I am assuming that /usr/sbin is on your PATH.


mount / -o remount,rw,noatime


cd /tmp/opt/lib
mv libb* /usr/lib
mv libc* /usr/lib
mv libe* /usr/lib
mv libu* /usr/lib


cd /tmp/opt/sbin
mv blkid /usr/sbin
mv findfs /usr/sbin


OK, this puts the files on the NAND and I can use blkid to locate the optware flash drive by UUID, and use findfs use in /etc/init.d/rcS to mount it to /opt. Next I need to locate the actual device UUID for the startup script. Run blkid to get the UUID, and write this down.

blkid
/dev/sda1: UUID="2CB9-87AD" TYPE="vfat" LABEL="LeeJones"
/dev/sdb1: UUID="fc640330-9e49" TYPE="ext3" LABEL="OPTWARE"

NOTE: the UUID and LABEL are case sensitive.

In this case, my Optware drive has a UUID of fc640330-9349. Now we should be able to locate the Optware USB drive (or any particular drive) with the findfs command:


findfs UUID="fc640330-9e49"

This returns the result of /dev/sdb1


Editing the startup /etc/init.d/rcS script

Using your favorite text editor, add the following line to /etc/init.d/rcS before anything calls /opt

mount `findfs UUID="fc640330-9e49"` /opt

NOTE: The character before findfs is a back quote (`) not an apostrophe ('). Look for the back quote on the tilde key (~) next to your number 1 key.

Once you have saved the changes to rcS, reboot:

mount / -o remount,ro
sync
sync
reboot

Extra Credit

Personally, I want to minimize the changes to my copy of /etc/init.d/rcS, so mine is the factory default one plus the following two extra lines at the end:

mount `findfs UUID="fc640330-9e49"` /opt # mounts Optware USB
/opt/etc/init.d/optrun.sh # runs additional software

The contents of /opt/etc/init.d/optrun.sh are as follows:

#!/bin/sh
# runs optware startups in sort order
cd /opt/etc/init.d
for i in `ls S* | sort`
do
  ./$i start
done

This allows me to make minimal changes to /etc/init.d/rcS, just enough to find and properly mount Optware to /opt every single reboot. The optrun.sh command starts any additional things I want, such as rsync. Anything file in /opt/etc/init.d that is both executable and begins with a capital S will be ran at boot time.

Also, if I screw up on one on of my additions (been there) and disable my device, all I have to do is power off the Pogoplug, pull out the Optware USB drive and reboot. After a normal boot, I plug the drive back in and fix my mistake.