DriveMan drive manager and AutoDrive auto. mounter.

Under development: PCMCIA, wireless, etc.
Message
Author
User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#31 Post by 8-bit »

I just ran the driveman.uninstall script and found a potential problem.
With it in the driveman directory, if you select the button to remove both driveman and autodrive, it crashes without removing the autodrive directory.
I moved it outside of the driveman directory and it worked.
But in that case another line needs to be added to delete driveman.uninstall.

I also did some modifications to driveman and driveman.set.gtk3 and with them, I got it to run on Puppy 431 and Puppy 432.

Also, FYI, when I run driveman from a terminal, I get an error message of DEV being a directory.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#32 Post by sunburnt »

big_bass; So did you then try replacing the 3 files in: /root/Startup ?
The 2 don`t cause the apps. to boot automatically, they check the Settings file for "true".
And the file: 0_mountdrives.startup only mounts drives if they are listed in:
/mnt/home/apps/driveman/drvboot.lst

Give these last few files a try and let me know, I`d like to release the last beta version.

Terry 8)

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#33 Post by 8-bit »

A nice addition to your driveman program would be for it to autodetect a storage device that was plugged in while it was running and update accordingly.
When I had DM displayed and plugged in a USB flash stick, it was not detected without a restart of driveman.

Also, what about making it a tray application that would pop up?
That way, those that love their nice desktop background pics would not have them cluttered with a DM window.

I know you love these types of suggestions. :wink:

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#34 Post by sunburnt »

Hi 8-bit; DM does show USBs plugged in. For me anyway...
The tray app. is not a bad idea at all...

big_bass; Does DM show and remove USB drives that AutoDrive mounts and unmounts for you?

User avatar
technosaurus
Posts: 4853
Joined: Mon 19 May 2008, 01:24
Location: Blue Springs, MO
Contact:

#35 Post by technosaurus »

8-bit wrote: But in that case another line needs to be added to delete driveman.uninstall.

Code: Select all

#deletes this script
rm $0
$0 is a good little tool for making busybox style scripts that share code and/or functions within the same file. By making symlinks to your bash script with different names, you can change how it operates by checking `basename $0` to determine which functions or code blocks to use.

Code: Select all

#very rough example dir2tar with symlinks for dir2tgz, dir2tbz, dir2xz ...
DIRNAME=$1
tar -cf ${DIRNAME}.tar ${DIRNAME}
[ "`basename $0`" == "dir2tgz" ] && gzip ${DIRNAME}.tar
[ "`basename $0`" == "dir2tbz" ] && bzip ${DIRNAME}.tar
[ "`basename $0`" == "dir2txz" ] && xz ${DIRNAME}.tar
...
Check out my [url=https://github.com/technosaurus]github repositories[/url]. I may eventually get around to updating my [url=http://bashismal.blogspot.com]blogspot[/url].

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#36 Post by 8-bit »

sunburnt wrote:Hi 8-bit; DM does show USBs plugged in. For me anyway...
The tray app. is not a bad idea at all...

big_bass; Does DM show and remove USB drives that AutoDrive mounts and unmounts for you?
My mistake! :oops:
I did not have autodrive set up to start when booting or restarting X in the settings!
It works!

And just out of curiosity, is this to be a replacement for Hotpup and Pmount?
Also, can it be given a selection to mount selected drives on startup?
The word is selected, not all.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#37 Post by sunburnt »

Thanks technosaurus and 8-bit; I didn`t try the uninstall and didn`t think to delete AutoDrive first!
8-bit; DriveMan and AutoDrive doen`t restart X, DriveMan does restart JWM if needed.
I`m not sure what you`re saying about mounting drives at bootup.
If you select a drive in DriveMan`s list and click [ Set Boot } a "B" should appear in the list.
And at bootup the selected drive will be mounted automatically.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#38 Post by 8-bit »

Thank you for the explanation of the B option. It works as advertised.
I just tried my moded version on the new pup44-a1 (community version),
and had major problems with that OS doing strange things.
driveman still worked as expected, but It could be that since it installs with a script rather than going through Puppy Package Manager, that messed things up.
Of course, puppy 44 uses a strange menu system as it is partially based on stardust.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#39 Post by sunburnt »

Yep, it just keeps changing like Linux itself. There doesn`t seem to be any plan, it just happens.
I`ve rewritten apps. several times so they`ll work again, sometimes in the same Puppy version.
If a new version does new hardware or maybe new features, well... maybe. Why else change?
I find a Puppy version that works well on my PCs, and I stay with it, usually 2 per version.

I`ve seen programmers and developers come and go in my 5 years here, mostly programmers.
Lots of time and effort spent with a short shelf life for any app. written. Too much effort...
Effort that truly improves "Linux" is well spent, but most of it amounts to window dressing.
Linux "could" smash M$ Wenners and they know it, but they don`t worry, Linux is scattered.

Effort put to cleaning the legacy mess and especially gtkdialog would be very well spent.
gtkdialog is sooo important, but it`s also sooo hard to use that it`s the biggest bane of Puppy.
And... It would be one of the easier things to straighten out! But without agreement... Nada...
Tried TinyCore? Squash and Web apps. It`s more for hobbyists, but that`s where Puppy started.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#40 Post by 8-bit »

I do not think it is anything driveman has done! I think it is a glitch in Puppy 44 and have reported it as such.
By the way, with mods I have made to your program, I now can use it with no problems and no errors other than 2.
One is an error of DEV being a directory.
The other is that if a drive is already mounted and you click on ROX from the popup, the way the btnMNT routine is written, the mounted drive is unmounted and then ROX displays an empty directory.
Could a conditional if be added that if $2=rox the umount would be bypassed and rox display the mounted partition? I can live with the way it is now, since I know what is happening.
Also, have you figured out how to get DM not to display the extra mounted directory with the blank name that I assume is the filesystem in memory?

And last, to get driveman to work with my Puppy versions 431 and 432, I did modifications to driveman and driveman.set.gtk3 to where driveman.gtk3 never has to call any functions in driveman to make changes to the settings file!
In my case, that means I can remove all the functions that call writeSET in driveman if I wanted.
Other than getting it's screen position from driveman, I have driveman.set.gtk3 set up to make all changes to the settings file on its own.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#41 Post by sunburnt »

8-bit; See my post to big_bass above, he already reported that problem and I fixed it. See code...
Also a fix for the Settings GUI`s 2 "run at boot" CheckBoxes always being on. See code also...

big_bass
Posts: 1740
Joined: Mon 13 Aug 2007, 12:21

#42 Post by big_bass »

sunburnt wrote:8-bit; See my post to big_bass above, he already reported that problem and I fixed it. See code...
Also a fix for the Settings GUI`s 2 "run at boot" CheckBoxes always being on. See code also...

@8-bit
but It could be that since it installs with a script rather than going through Puppy Package Manager, that messed things up.


I sent sunburnt a pet package of his work I just modified the uninstall script into a
a pinstall script so you start clean and placed the files in the correct folders for petget
to register everything correctly since is all of sunburnts patches and work he has to approve the package
first *maybe you could test it


@sunburnt the pet package works well for me

all of the error 8-bit is having were solved

thanks
Joe

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#43 Post by 8-bit »

big_bass and sunburnt,

I have also been examining the driveman routines and I never could get it to run consistently on Puppy 431 and Puppy 432 without it making an empty settings file. So I did some modifications to it.
That is what open source is after all.
Anyway, could either or both of you check out my modifications by running it with my mods to driveman and driveman.set.gtk3?
Be sure to back up your original files and then extract the files to /root/my-applications/driveman.

Caution, it needs to be started the first time with NO settings file.
Attachments
driveman_mod3.tar.gz
Highly modified driveman and driveman.set.gtk3 files. Extract to the driveman directory to test and remove or rename your exsisting settings file.
(3.93 KiB) Downloaded 412 times

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#44 Post by 8-bit »

In the original driveman script and also the one I modified, I noticed an error that occurs before the DM window shows.
The initial placement of the DM window is taken from guiinfo.
But if there is no guiinfo file on first run it is created with

Code: Select all

	[ ! -e $guiINFO ]&& echo -e 'LEFT=60'\\n'TOP=80' > $guiINFO							# if none, make GUI position file
What it should be is

Code: Select all

	[ ! -e $guiINFO ]&& echo -e 'X=60'\\n'Y=80' > $guiINFO							# if none, make GUI position file
I assume this because I see no reference to LEFT and TOP being used for initial position of the DM window.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#45 Post by sunburnt »

Good eye 8-bit, and yet another left over from changes. Left and Top is far more descriptive than X and Y.
X and Y could be any dimension ( Left, Top, Width, Height ) and for any GUI object or even the screen.

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#46 Post by 8-bit »

I just plugged in an external USB hard drive with 2 partitions; one ext2 and a swap partition.
DM showed the swap partition in it;s list of drives/partitions.
I think this goes along with DM showing the mounted Puppy filesystem as a drive with a blank name.
Is there any way for driveman to check partition/drive type and not display a swap partition or for that matter, the mounted Puppy file system as a drive/partition?

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#47 Post by 8-bit »

Being a glutton for punishment, I just tried adding driveman to .jwmrc-tray.

I used the same line that the popup keyboard line used except for replacing xvkbd with driveman in the line.
When I restarted JWM, driveman popped up.
But since there is no code in it to hide it if it is not being used, it stayed up.
But the interesting part was that the line started it.

Learn by experimenting.

User avatar
sunburnt
Posts: 5090
Joined: Wed 08 Jun 2005, 23:11
Location: Arizona, U.S.A.

#48 Post by sunburnt »

No, the empty ROX filer is due to it unmounting the drive and running ROX. Fixed...
Run ROX on an unused dir. like /mnt/data, it`ll be empty because the dir. is empty.

But this line in DriveMan is supposed to filter out the extended and swap partitions:

Code: Select all

															##  L.s    L.x    L.x    95x   NTx  ###
[ "`disktype /dev/$DEV | egrep '(0x82|0x83|0x05|0x0F|0x42)'`" ]&& continue
Could you run this command on your swap to see what your swap is reported as:
disktype (swap partition)
disktype /dev/sda4 .......... ( Example )
The output looks like this:

Code: Select all

# disktype /dev/sda3

--- /dev/sda3
Block device, size 21.05 GiB (22603069440 bytes)
Swap file
  Volume size 1.05 GiB (22603067392 bytes, 5518327 blocks of 4 KiB)[.code]
  Type 0x82 (Linux Swap)
Yours will look a little different from what I posted here... ( I don`t use a swap )
Could you post the output for me? It should be: " Type 0x82 " , but we`ll see...

User avatar
8-bit
Posts: 3406
Joined: Wed 04 Apr 2007, 03:37
Location: Oregon

#49 Post by 8-bit »

Ask and you shall receive.
Although hotpup does not show the swap partition, driveman does.
Hotpup on my PC only shows an icon for sde1.
Driveman shows one for sde1 and sde2.

And as to the requested information, here it is:

# disktype /dev/sde2

--- /dev/sde2
Block device, size 1.004 GiB (1077511680 bytes)
Linux swap, version 2, subversion 1, 4 KiB pages, little-endian
Swap size 1.004 GiB (1077501952 bytes, 263062 pages of 4 KiB)

#

It looks to me like disktype is not returning any "Type xxxx " information.
So your checks fail.

seaside
Posts: 934
Joined: Thu 12 Apr 2007, 00:19

#50 Post by seaside »

Yes, disktype /dev/xxx apparently doesn't always return the hex id for swap and extended.

It always returns text id so this should work-

Code: Select all

 disktype /dev/sddx |egrep '(swap|0x83|Extended|0x0F|0x42)'
Cheers,
s
(Even nicer to have a name - I don't speak xeh very well :D )

Post Reply