Fun plug management

103 views
Skip to first unread message

Dwight Hubbard

unread,
Mar 1, 2011, 10:46:50 AM3/1/11
to al...@googlegroups.com
I finally got the bootloader I mentioned a while back written.  I had one idea I wanted to put out there.

That is adding a drop down menu to System->Utilities->Reboot to allow specifying the fun-plug to run on reboot.  I could just create a package for the funplug_manager that allows configuring the OS to reboot from it's configuration page but it seems like it would make more sense from a UI standpoint for it to be part of the System->Utilities page.

Joao Cardoso

unread,
Mar 1, 2011, 12:24:51 PM3/1/11
to Alt-F
Looks fine to me.

The dropdown would only appear if
-the unity is not Alt-F flashed, using isflashed() from common.sh.
-the funplug_manager package is installed

The default funplug name to use should be stored in /etc/misc.conf,
and selected by default.

What do you think?

PS-Guess that isflashed is not yet in svn, and sys_utils*.cgi neither
(and has changed)

# returns true if Alt-F is flashed
isflashed() {
flashed_firmware=$(dd if=/dev/mtdblock2 ibs=64 count=1 2> /dev/
null | strings)
echo $flashed_firmware | grep -q Alt-F
}

Joao Cardoso

unread,
Mar 1, 2011, 12:43:04 PM3/1/11
to Alt-F


On Mar 1, 5:24 pm, Joao Cardoso <whoami.jc...@gmail.com> wrote:
> On Mar 1, 3:46 pm, Dwight Hubbard <dwight.hubb...@gmail.com> wrote:
>
> > I finally got the bootloader I mentioned a while back written.  I had one
> > idea I wanted to put out there.
>
> > That is adding a drop down menu to System->Utilities->Reboot to allow
> > specifying the fun-plug to run on reboot.  I could just create a package for
> > the funplug_manager that allows configuring the OS to reboot from it's
> > configuration page but it seems like it would make more sense from a UI
> > standpoint for it to be part of the System->Utilities page.
>
> Looks fine to me.
>
> The dropdown would only appear if
>  -the unity is not Alt-F flashed, using isflashed() from common.sh.
>  -the funplug_manager package is installed
>
> The default funplug name to use should be stored in /etc/misc.conf,
> and selected by default.

I forgot to say: in this case the 2 minutes timeout is not needed,
right? Can the funplug_manager "boot" the right funplug without any
delay?

Dwight Hubbard

unread,
Mar 1, 2011, 8:00:54 PM3/1/11
to al...@googlegroups.com
The default funplug that the funplug_manager will boot if nothing is selected funplug.d/default which is a symlink to the funplug script to run.  The selector just changes the link when a different fun plug is selected.  I could store a copy of the setting in /etc/misc.conf but it would seem to me to be easier to just have the cgi dereference the symlink instead of storing the info in 2 places.

I like the idea of a no-delay option.  That would be pretty simple to add, I could have the fun_plug script that calls the webserver skip running the web selector if there is a funplug.nodelay file.  Remove the funplug.nodelay file and immediately run the default fun_plug.

Dwight Hubbard

unread,
Mar 3, 2011, 6:19:44 AM3/3/11
to al...@googlegroups.com
Ok, in the next version of the funplug_manager has been cleaned up a good deal.  Here is how to get funplug_manger
0.15 or newer to boot into a specific fun_plug script without delaying to prompt the user (replace /mnt/HD_a2 with
/mnt/sda2 as appropriate, oh and the nodelay file is deleted after use, so it's a one time thing):

touch /mnt/HD_a2/fun_plug.d/conf/nodelay
(cd /mnt/HD_a2/fun_plug.d/funplugs;rm default;ln -s "desiredfpscript" "default")

Dwight Hubbard

unread,
Mar 8, 2011, 12:11:00 PM3/8/11
to al...@googlegroups.com
In the newest version the script fun_plug.d/bin/rebootinto does this.

Joao Cardoso

unread,
Mar 8, 2011, 2:35:28 PM3/8/11
to Alt-F


On Mar 8, 5:11 pm, Dwight Hubbard <dwight.hubb...@gmail.com> wrote:
> In the newest version the script fun_plug.d/bin/rebootinto does this.

The "signature" to see if the fun_plug manager is installed (by the
user) is if a "fun_plug.d" exists in the root of any of the mounted
filesystems, right?
That's because of the kernel enumeration and RAID exixtence, one does
not know if the "boot" device is in /mnt/sda2, or /mnt/md0, or even /
mnt/sdd2 (with two usb pens attached, and errors in one of them, it
happened to me once that the disks devices where sdc and sdd !).

Dwight Hubbard

unread,
Mar 8, 2011, 3:21:13 PM3/8/11
to al...@googlegroups.com
Good question I currently search multiple directories for the fun_plug.d dirrctory (Don't recall all of them offhand)
Reply all
Reply to author
Forward
0 new messages