sq

Programming issues and discussion
Scooby
Site Admin
Posts: 826
Joined: 09 Sep 2013, 16:52

sq

Postby Scooby » 04 Apr 2014, 21:46

Since I moved a way from using savefile I occasionally need to save RAM or
perhaps edit a configfile for system and then I squash only that file
to shadow out the one in base bundles (after reboot).

Anyway it got boring to do it by hand so I automate it
in this script sq.

just wanted to share

Script works for both 32-bit and 64-bit versions.

OBS! To make it work you have to set path to your modules dir
script will modify its own file to contain new path to modules hence forth

sq -s /path/to/your/modules

(can be verified by running sed -n 21p sq )


Drop it in /usr/bin for convenience

DOWNLOAD: sq



Code: Select all

> sq --help
        Usage:
      exxer [OPTION]... [FILES]...
          -h, --help            display usage message.
         
          -v, --version         display script version.

          -s, --set-modules-dir Set path to your own
                                modules directory
                                It defaults to:
                                /mnt/home/alphaos/modules
         
                        
     if you want to squash some of the top directories
     in RAM then supply only one argument which is the
     name of the resulting module without .sb ending
     
     if two arguments are supplied the first is the
     name of file or directory to be squashed the
     second is the name of resulting bundle without
     .sb ending

    OBS! naming matters since it controls in what
         order modules are loaded during boot. I
         use numbers in front where 9 will be
         loaded before 8            
               
     Examples:
               sq 2222222RAM_SAVED
               sq /root/.start 1111111start
               sq --set-modules-dir /mnt/home/alphaos/modules

Return to “Scripting and Programming”

Who is online

Users browsing this forum: No registered users and 10 guests

cron