Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Sat 20 Sep 2014, 12:04
All times are UTC - 4
 Forum index » Advanced Topics » Cutting edge
DriveMan drive manager and AutoDrive auto. mounter.
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 2 of 4 [56 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Author Message
sunburnt


Joined: 08 Jun 2005
Posts: 5029
Location: Arizona, U.S.A.

PostPosted: Sat 17 Apr 2010, 00:23    Post subject:  

Evidently the error must not be a bad one as normal execution of DriveMan doesn`t show it.
I guess grep is just really picky, I never noticed because it works anyway...

I got and will look at your mounter, I made a boot mounter with Xdialog years ago.
And you`ll see another "old" mount app. of mine if you look at: /usr/sbin/filemnt
Barry heavily modified it, it really needed it as I was new to scripting back then.

I hope to post beta-7 tomorrow after running it through repeated testing.
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sat 17 Apr 2010, 14:28    Post subject:  

Quote:
Evidently the error must not be a bad one as normal execution of DriveMan doesn`t show it.
I guess grep is just really picky, I never noticed because it works anyway...



I said it was a grep warning only while debugging
just wanted you to verify that

it is working correctly for me

I hope to have some time later today to run some more tests

*A side note long before I modified xfilmount on my slackware box
and I want to say thanks for your older work I was able to easily mount the unique puppy files 2fs 3fs sfs (sfs required kernel support to be compiled in ) which in turn lead to the making of slaxer pup

I had to get everything else working my plan was and is to make
puppy more linux friendly so interchanging of programs
would be possible



strange how a chain of events started so long ago

Thanks
Joe


P.S I removed the link I posted (should have just sent it as a PM )


and your latest driveman Cool

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5029
Location: Arizona, U.S.A.

PostPosted: Sat 17 Apr 2010, 16:12    Post subject:  

8-bit; I made an extra check on the Settings file size being too small. But a DM restart`s needed.

big_bass; Your thoughts on "other" Linuxes and how to make the 2 apps. work universally...
Puppy uses /root, which usually isn`t used in other Linuxes, they use the user`s dir. ( natch ).
So users have no access to the /root/my-applications dir. even if the other Linuxes have one.
SO... I guess putting the apps. in /usr/local solves the problem... Huh? All Linuxes have it...
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Sat 17 Apr 2010, 17:32    Post subject:  

When do I get to check out your latest offering beyond version 6?
I am going crazy trying to track down what is causing the settings file to be overwritten with a blank file.
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5029
Location: Arizona, U.S.A.

PostPosted: Sat 17 Apr 2010, 19:10    Post subject:  

Ok... Here`s beta-7, I didn`t get as much time to test it as I wanted, it seems to work well.
It`s done weird stuff a few times ( typical Bash ):
It mounted all the drives ( don`t know why ).
And took 20 secs. to unmount a USB once ( maybe not it`s fault ).
### See the original post for the new version`s download...

8-bit; Be sure to delete the old /driveman and /autodrive dirs.

big_bass; Try it on Slax and let us know if it worked, I`ll try to fix any bugaboos.
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sat 17 Apr 2010, 21:28    Post subject:  

Hey sunburnt


as far as where your app should be installed when you decide to package it is in /usr/sbin because it is a mounting tool and that would be the correct location



you dont need any code to write into JWM the installer takes care of that
even my hacked slackwares package tools has no problem updating the menus automatically

no need coping the desktop with the script
all gets handled with petget or pkgtools when the package is registered
this also allows for clean uninstalls

!!I havent tried your latest version yet that you uploaded today !!
*I still have one problem with the drive man settings option starting with two boxes checked

I discovered that when driveman is first run
and while its open if I delete the following three files
on a clean installed puppy pfix=ram and nothing else installed

Code:

rm -f /root/Startup/0_mountdrives.startup
rm -f /root/Startup/autodrive.startup
rm -f /root/Startup/driveman.startup 



the setting box then is cleared

the problem is that on the very first run of driveman
these files get auto created instantly after clicking on driveman
/root/Startup/0_mountdrives.startup
/root/Startup/autodrive.startup
/root/Startup/driveman.startup


so I have to figure out why this condition happens
maybe because on slaxer_pup my drives are labeled as
hda for hard drives sda for USB drives hdc or hdd for cd/dvd drives
the old standard way

I am getting closer at least I confirmed a temp fix


if you would like for me to generate any logs to help you track this
just let me know what you need to see


Joe

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Sat 17 Apr 2010, 23:59    Post subject:  

BigBass,
Examine lines 66-71 in the driveman file and you will see those files get copied before any settings file is ever created. Also, they get copied even if there is a settings file every time driveman is run.
The test for a settings file and creation is a few more lines down.
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5029
Location: Arizona, U.S.A.

PostPosted: Sun 18 Apr 2010, 00:50    Post subject:  

Hi joe; I put AutoDrive in /usr/sbin at first, but as the files grew I didn`t want the mess it made.
That`s why I started naming all the files with the apps. name so they`re all grouped together.
As the number of files grew for each app. I decided it`d be best to give them their own dirs.
So /root/my-applications seemed best, except when you want them to work for most Linuxes.
But most of Puppy`s apps. are in /usr/local in their own dirs., so it`s really the best place for them.
Neither app. needs to be in the path, and they`re not command line tools or common utilities.

Puppy`s installer copies the menu and startup files? And how would it know what to write to .jwmrc?
DriveMan has the "sticky" Settings option that gets added and removed from the lines in .jwmrc.

The startup files check the Settings file to see if DriveMan or AutoDrive are to be run at boot.
They don`t just only run the apps., they first test to see if they are to be run or not.
And why deleting the 3 startup files would have any effect on the Settings file is nutty.
They make no difference to the Settings file, but if Settings isn`t there, the apps. won`t bootup.

I found the 2 checkbox problems, they`re still the same as when the startup files were different.
Just comment out the 2 "if" statements at these lines ( I think ): 148, 149, 152, 153:
Code:
btnSET() {
   . $Settings
#   if [ -e /root/Startup/$dmF.startup ];then         # set driveman boot display
#      writeSET dmBOOT=true ;else writeSET dmBOOT=false ;fi
   if [ "`grep DM_MAIN /root/.jwmrc |grep sticky`" ];then      # set driveman sticky display
      writeSET dmSTICKY=true ;else writeSET dmSTICKY=false ;fi
#   if [ -e /root/Startup/$adF.startup ];then            # set autodrive boot display
#      writeSET adBOOT=true ;else writeSET adBOOT=false ;fi


8-bit; All of the first boot files are only copied if they don`t exist. The test below, " ! -e ".
Code:
if [ ! -e /root/Setup/$dmF.startup ];then cp -f $adPF.startup /root/Startup ;fi
Back to top
View user's profile Send private message 
8-bit


Joined: 03 Apr 2007
Posts: 3368
Location: Oregon

PostPosted: Sun 18 Apr 2010, 01:02    Post subject:  

Sunburnt, I had never examined the files written to /root/Startup and just assumed they started the things the name referred to.
Bad assumption on my part! Embarassed
So that one is solved for me.

Now if I could track down exactly what is happening with the settings file when I run it on Puppy 432, that would be great.
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5029
Location: Arizona, U.S.A.

PostPosted: Sun 18 Apr 2010, 01:14    Post subject:  

8-bit; I`ve been looking at the function that modifies the setting in the Settings file ( line 42 ):
Code:
writeSET() { VAR=`echo $1 |sed 's/=.*$//'`
   echo "$(<$Settings)" |sed "s/$VAR=.*$/$1/" > $Settings         # write setting to file
}

You could try experimenting with the 2 lines of code to see what they do to the setting.
Call the function like this: /mnt/home/apps/driveman/driveman writeSET setHT=22
The variable assignment you give it should replace the one that was there.
If the variable assignment in the Settings file was: set=8 , now it should be: setHT=22
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sun 18 Apr 2010, 17:26    Post subject:  

Hey Terry (sunburnt)


before I get into the details I spent a few hours last night and a few more this morning Very Happy because I want another mount tool
as a stand alone app




Quote:

And why deleting the 3 startup files would have any effect on the Settings file is nutty.
They make no difference to the Settings file, but if Settings isn`t there, the apps. won`t bootup.


as strange as that may be it lead me to comment out the
writing of those three files (while in the testing stage)
I run out of the driveman folder

I am not worried about that part of the code ATM because
I made a tmp fix so I consider it a minor glitch I will figure out

thanks again for removing probepart and pupstate Very Happy
--------------------------------------------
version 7 created a small new small glitch
it requires you to click on Rox_Filer (twice) but not like windows
the program opens an empty folder
then the second time around after the box closes and opens again clicking Rox_Filer does work
and show the contents of the folder

I did mount the drives before selecting rox


------------------------------------------------
I think that its fine on puppy to use my-applications
since every one has it

an install script aka doinst or pinstall
could handle jwm
just to get it out of the main code (if possible)
so if you run ice or another manager
small tweaks can be easily made

*out side of puppy its no big deal for me to modify
the package to run on another linux version
I just am taking advantage of the massive time saved
if you filter out those files first

whats the gain ? you will also eliminate the differences
in puppy versions too by not depending on any code from it


Joe

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5029
Location: Arizona, U.S.A.

PostPosted: Sun 18 Apr 2010, 18:09    Post subject:  

Hi big_bass; Amazingly I`m having the same ROX thing happen, will look into it.
FYI... Clicking the ROX menu item should mount if not mounted ( probably the empty ROX ).

# Repeat of the post above:
I found the 2 bootup checkbox problems, I changed the bootup but not handler code.
Just comment out the 2 "if" statements at these lines: 148, 149, 152, 153 ( I think ):
Code:
btnSET() {
   . $Settings
#   if [ -e /root/Startup/$dmF.startup ];then         # set driveman boot display
#      writeSET dmBOOT=true ;else writeSET dmBOOT=false ;fi
   if [ "`grep DM_MAIN /root/.jwmrc |grep sticky`" ];then      # set driveman sticky display
      writeSET dmSTICKY=true ;else writeSET dmSTICKY=false ;fi
#   if [ -e /root/Startup/$adF.startup ];then            # set autodrive boot display
#      writeSET adBOOT=true ;else writeSET adBOOT=false ;fi

I could add a line to check for the /root/.jwmrc file first ( if not a Puppy distro.).
For Ice WM tell me if you know how to set: " TaskBar No Show" and "Sticky On Desktop".

The 3 files... They are the only way DriveMan and AutoDrive start and mount at boot.
The /root dir. is not used usually in most Linuxes, the used dir. is of course.
Where would be a good place to put the 3 files so they`ll work universally?
And then there`s the driveman.desktop file for the menus, it needs a fix for that also.
Back to top
View user's profile Send private message 
sunburnt


Joined: 08 Jun 2005
Posts: 5029
Location: Arizona, U.S.A.

PostPosted: Sun 18 Apr 2010, 18:52    Post subject:  

Fix for the ROX menu item unmounting the drive. It`s easiest to just post the entire function:
Code:
btnMNT() {
   if [ "$sysDRV" = "$1" ];then                                                                                          # if system drive, rox, exit
      [ "$2" = rox ]&& rox `mount |grep $1 |cut -d ' ' -f 3` ; return ;fi
   drvInfo=$(<$drvINFO)                                                                                                         # get GUIs drive list
   ROW=`echo "$drvInfo" |grep $1`                                                                              # get drive list device ROW
   if [ ! "`mount |grep $1`" ];then                                          ## mount drive
      if [[ "$1" = sr* ]];then
         if [ "`echo $(disktype /dev/$1) |sed 's/^.*size //;s/ .*$//'`" = 0 ];then         # blank CD-DVD
            xmessage -nearmouse -title " ERROR" "  Blank CD-DVD in Drive. " ; return ;fi
         disktype /dev/$1 2> /tmp/dt.tmp
         if [ "`echo $(</tmp/dt.tmp) |grep 'No medium found'`" ];then                        # no CD-DVD
            xmessage -nearmouse -title " ERROR" "  No CD-DVD in Drive. " ; return ;fi
      fi
      mkdir -p /mnt/$1 ; mount /dev/$1 /mnt/$1
      if [ $? -eq 0 ];then NEW=`echo $ROW |sed "s/||/|M|/"`                        # if mount successful
         echo "$drvInfo" |sed "s/$ROW/$NEW/" > $drvINFO
      else xmessage -nearmouse -title " ERROR" "  Failed to Mount Device: $1  " ; return      # mount failed
      fi
   elif [ ! "$2" ];then                                                                           ## unmount drive
      NEW=`echo $ROW |sed "s/M//"`
      rox -D /mnt/$1 ; umount /dev/$1
      if [ $? -gt 0 ];then                                                                                                            # if unmt failed, error
         xmessage -title " ERROR" "  Failed to UnMount Drive. " ; return ;fi
      echo "$drvInfo" |sed "s/$ROW/$NEW/" > $drvINFO
   fi
   [ "`mount |grep $1`" ]&& [ "$2" ]&& rox /mnt/$1                                       #if mounted and rox arg.
   killPS DRIVEMAN ; $dmPF &
}
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Sun 18 Apr 2010, 21:26    Post subject:  

Terry (sunburnt)

check your PM mail

Joe

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
big_bass

Joined: 13 Aug 2007
Posts: 1747

PostPosted: Mon 19 Apr 2010, 11:49    Post subject:  

Hey Terry (sunburnt)


with the two latest patches you posted

it works great!!!! Cool

thanks

Joe

_________________
debian wheezy ,linux mint, slackware I use them all and they all have good points
Mint would be best for general users though
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 2 of 4 [56 Posts]   Goto page: Previous 1, 2, 3, 4 Next
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » Advanced Topics » Cutting edge
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.1064s ][ Queries: 13 (0.0047s) ][ GZIP on ]