DriveMan drive manager and AutoDrive auto. mounter.
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.
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.
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
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...
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...
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.
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.
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
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
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: Select all
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
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:
8-bit; All of the first boot files are only copied if they don`t exist. The test below, " ! -e ".
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: Select all
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
Code: Select all
if [ ! -e /root/Setup/$dmF.startup ];then cp -f $adPF.startup /root/Startup ;fi
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!
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.
Bad assumption on my part!
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.
8-bit; I`ve been looking at the function that modifies the setting in the Settings file ( line 42 ):
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
Code: Select all
writeSET() { VAR=`echo $1 |sed 's/=.*$//'`
echo "$(<$Settings)" |sed "s/$VAR=.*$/$1/" > $Settings # write setting to file
}
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
Hey Terry (sunburnt)
before I get into the details I spent a few hours last night and a few more this morning because I want another mount tool
as a stand alone app
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
--------------------------------------------
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
before I get into the details I spent a few hours last night and a few more this morning because I want another mount tool
as a stand alone app
as strange as that may be it lead me to comment out theAnd 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.
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
--------------------------------------------
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
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 ):
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.
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: Select all
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
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.
Fix for the ROX menu item unmounting the drive. It`s easiest to just post the entire function:
Code: Select all
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 &
}
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.
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.
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
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
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.
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.
- technosaurus
- Posts: 4853
- Joined: Mon 19 May 2008, 01:24
- Location: Blue Springs, MO
- Contact:
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
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].