patching /usr/sbin/filemnt

Using applications, configuring, problems
Post Reply
Message
Author
User avatar
MinHundHettePerro
Posts: 852
Joined: Thu 05 Feb 2009, 22:22
Location: SE

patching /usr/sbin/filemnt

#1 Post by MinHundHettePerro »

Hello :)!

When something goes awry with mounting a file with /usr/sbin/filemnt, the /mnt/+..+..+.. entry is left there - forcing another run of /usr/sbin/filemnt to remove it-

To redeem:
Patch /usr/sbin/filemnt with (older filemnt, like in slacko-5.3)

Code: Select all

--- filemnt_org	2012-11-05 23:03:21.000000000 +0100
+++ filemnt	2012-12-01 23:08:31.000000000 +0100
@@ -133,6 +133,8 @@
 #   yaf-splash -timeout 6 -font "8x16" -outline 0 -margin 4 -bg green -text "SUCCESS! Click $imgFileBASE icon again to unmount it" & #BK
 #   /usr/X11R7/bin/yaf-splash -timeout 6 -font "8x16" -outline 0 -margin 4 -bg green -text "SUCCESS! Click $imgFileBASE icon again to unmount it" & #BK
    yaf-splash -timeout 6 -bg green -text "SUCCESS! Click $imgFileBASE icon again to unmount it" & #BK
+  else # MHHP 121201
+   rmdir $MntPt # /MHHP 121201
   fi
 
  else                                                   ### file's mounted, unmount it
or, for newer versions of /usr/sbin/filemnt

Code: Select all

--- filemnt_org	2012-11-05 23:03:21.000000000 +0100
+++ filemnt	2012-12-01 23:08:31.000000000 +0100
@@ -193,6 +193,8 @@
 #   yaf-splash -timeout 6 -font "8x16" -outline 0 -margin 4 -bg green -text "SUCCESS! Click $imgFileBASE icon again to unmount it" & #BK
 #   /usr/X11R7/bin/yaf-splash -timeout 6 -font "8x16" -outline 0 -margin 4 -bg green -text "SUCCESS! Click $imgFileBASE icon again to unmount it" & #BK
    yaf-splash -timeout 6 -bg green -text "SUCCESS! Click $imgFileBASE icon again to unmount it" & #BK
+  else # MHHP 121201
+   rmdir $MntPt # /MHHP 121201
   fi
 
  else                                                   ### file's mounted, unmount it
.
Yes, the two patches above are identical - only difference is the line-numbers - patch (even with -F fuzziness set large (like 300)) mis-patches the newer filemnt when using the diff from the older filemnt :shock:.

Anyway, :)/ MHHP
[color=green]Celeron 2.8 GHz, 1 GB, i82845, many ptns, modes 12, 13
Dual Xeon 3.2 GHz, 1 GB, nvidia quadro nvs 285[/color]
Slackos & 214X, ... and Q6xx
[color=darkred]Nämen, vaf....[/color] [color=green]ln -s /dev/null MHHP[/color]

User avatar
BarryK
Puppy Master
Posts: 9392
Joined: Mon 09 May 2005, 09:23
Location: Perth, Western Australia
Contact:

#2 Post by BarryK »

Thanks, I have put that into Woof.
[url]https://bkhome.org/news/[/url]

Post Reply