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 Fri 18 Apr 2014, 06:39
All times are UTC - 4
 Forum index » House Training » Bugs ( Submit bugs )
restore_dotpup_menues.sh
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [6 Posts]  
Author Message
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Wed 02 Nov 2005, 00:33    Post subject:  restore_dotpup_menues.sh  

From the newspage:

BUG 2:
As described below, preservation of DotPup entries is still not working. The entries get extracted by the /usr/sbin/backup_dotpup_menues.wxbs to /tmp/menu_dotpup_fvwm95.txt and /tmp/menu_dotpup_jwm.txt, but when rc.update calls /usr/sbin/restore_dotpup_menues.sh they aren't getting reinserted.
However, run from the commandline:

# restore_dotpup_menues.sh

and they do get restored. So, something is wrong in the call from /etc/rc.d/rc.update.
Therefore for this 1.0.6rc, if upgrading your pup001 file from 1.0.5, after the bootup run the above program to fix the menus. Then restart the window manager. not yet fixed


Maybe it helps, to use absolute paths.

Try a new restore_dotpup_menues.sh:


Code:
#!/bin/sh

### ensure, we are in the correct folder

cd /usr/sbin/resource

./restore_dotpup_menues.sh

echo ---FINISHED---


I will have a look at the RC tomorrow.
Mark
Back to top
View user's profile Send private message Visit poster's website 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Wed 02 Nov 2005, 01:13    Post subject:  

some of the environmental variables that are setup in /etc/profile are not set up yet when scripts in /etc/rc.d are run ... this might or might not be the problem

for example, PATH, LD_LIBRARY_PATH

this sometimes causes a problem running something from rc.local
Back to top
View user's profile Send private message 
MU


Joined: 24 Aug 2005
Posts: 13642
Location: Karlsruhe, Germany

PostPosted: Wed 02 Nov 2005, 01:27    Post subject:  

The scripts don't use environment-variables.
It might be however (theoretically), puppybasic itself does, what could lead to a crash.

This could be tested by setting a line like this in restore_jwm_menues.wxbs:
writestringtofile("/tmp/testpb.txt" , "test")

If PuppyBasic crashes, there will be no "/tmp/testpb.txt" after execution.

Mark
Back to top
View user's profile Send private message Visit poster's website 
GuestToo
Puppy Master

Joined: 04 May 2005
Posts: 4078

PostPosted: Wed 02 Nov 2005, 03:08    Post subject:  

the point is some of the programs and utility programs and library files that are in /usr will not be available ... this might not be the problem, but it might (and the program almost certainly uses the PATH variable, which is changed after /etc/profile executes)
Back to top
View user's profile Send private message 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 02 Nov 2005, 04:08    Post subject:  

MU, GuestToo,

restore_dotpup_menues.sh is now totally a simple Ash shell script.
restore_jwm_menu.wxbs is not being used, as it didn't seem to work
-- I wrote a replacement.

Regarding PuppyBasic, that works, as backup_dotpup_menues.wxbs
works.

/usr is available at that stage.
(for example /usr/bin/wxbasicscript).

Both the restore_ and backup_ scripts are in /usr/sbin/.
Back to top
View user's profile Send private message Visit poster's website 
BarryK
Puppy Master


Joined: 09 May 2005
Posts: 7047
Location: Perth, Western Australia

PostPosted: Wed 02 Nov 2005, 04:21    Post subject:  

Oh, &^%$#@ (substitute culturally and religiously acceptable swear word here).

I think I found the problem.
Previously, it was working for Fvwm95 but not JWM, I think, so I replaced
restore_jwm_menu.wxbs with my own ash code inside restore_dotpup_menues.sh.

But, messing around with rc.update, I left out a key line:
Backup code:

Code:
  #v1.0.6
  #Mark Ulrich has written a DotPup installer that places entries into the w.m. menus.
  #which is a problem. he has written scripts to extract then restore. extract...
  DOTPUPS=""
  if [ ! "`cat $DESTROOT/.jwmrc 2>/dev/null | grep "Menu" | grep "DotPups"`" = "" ];then
   DOTPUPS="yes"
   echo "backing up DotPup entries in w.m. menus..."
   if [ "$DESTROOT" = "/root" ];then
    /usr/sbin/backup_dotpup_menues.wxbs
   else
    #installing to h.d....
    chroot $DESTMNT /usr/sbin/backup_dotpup_menues.wxbs
   fi
  fi


...but for 1.0.6rc I left out that DOTPUPS="yes" line.
Further down:

Code:
  #v1.0.6
  #Mark Ulich's script above to backup the DotPup info in menus. now restore...
  if [ "$DOTPUPS" = "yes" ];then
   echo "Restoring DotPup entries in w.m. menus..."
   if [ "$DESTROOT" = "/root" ];then
    /usr/sbin/restore_dotpup_menues.sh #note also calls restore_jwm_menue.wxbs
   else
    #installing to h.d....
    chroot $DESTMNT /usr/sbin/restore_dotpup_menues.sh
   fi
  fi


...so of course it never worked!
Embarassed
Back to top
View user's profile Send private message Visit poster's website 
Display posts from previous:   Sort by:   
Page 1 of 1 [6 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Bugs ( Submit bugs )
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.0457s ][ Queries: 11 (0.0029s) ][ GZIP on ]