Merge branch 'master' of github.com:fredhamster/feisty_meow
authorChris Koeritz <fred@gruntose.com>
Tue, 15 May 2018 23:09:36 +0000 (23:09 +0000)
committerChris Koeritz <fred@gruntose.com>
Tue, 15 May 2018 23:09:36 +0000 (23:09 +0000)
another odd merge point.

28 files changed:
documentation/feisty_meow_command_reference.txt
infobase/fortunes.dat
production/feisty_meow_config.ini
production/sites/cakelampvm.com/docs/manual/cakelampvm_guide_v002.html
readme.txt
scripts/core/common.alias
scripts/core/functions.sh
scripts/core/reconfigure_feisty_meow.sh
scripts/core/variables.sh
scripts/customize/fred/scripts/games/fallout_new_vegas_link_fixer.sh [new file with mode: 0644]
scripts/customize/fred/scripts/games/zap_fallout_task.sh [new file with mode: 0644]
scripts/generator/jenkins_builder.sh
scripts/opensim/opensim_utils.sh
scripts/rev_control/git_scruncher.sh [new file with mode: 0644]
scripts/rev_control/version_control.sh
scripts/security/password_functions.sh [new file with mode: 0644]
scripts/site_avenger/avcoreup.sh
scripts/site_avenger/config/ecocor6.app [new file with mode: 0644]
scripts/site_avenger/powerup.sh
scripts/site_avenger/revamp_cakelampvm.sh
scripts/site_avenger/shared_site_mgr.sh
scripts/site_avenger/sitepush.sh
scripts/site_avenger/siteup.sh
scripts/site_avenger/standup.sh
scripts/site_avenger/teardown.sh
scripts/system/add_swap_mount.sh
scripts/system/naive_system_updater.sh
scripts/wine/wine_link_maker.sh [new file with mode: 0644]

index ebe9d02c412b643c573a56513c4d1c8bbb83be88..acb6aa2658201034816d6dd1ed34b42e7a9e6fcc 100644 (file)
@@ -29,6 +29,9 @@ generally useful commands
   show the directory with a "summing" feature that calculates the full size
   consumed by all files in the listing, with somewhat esthetic output.
 
+  ll:
+  like 'dir' but also includes hidden files (e.g. those starting with a dot).
+
   ls:
   the standard ls command (not the summing directory), but with ls colors
   enabled.
@@ -38,12 +41,22 @@ generally useful commands
   deleted files in "$TMP/zz_safedel_keep" and writes a report of the deletion
   history in "$TMP/zz_safedel_report.txt".
 
-note: currently there is no "empty the trash" function aside from running a
-command such as:
-  # \rm -rf $TMP/zz_safedel*
-the backslash forces bash to run the "rm" tool from the path rather than
-using the feisty meow alias.  a trash flushing feature is planned for the
-somewhat near future.
+  note about safe deletion support:
+  currently there is no "empty the trash" function aside from running a
+  command such as:
+    $ \rm -rf $TMP/zz_safedel*
+  the backslash forces bash to run the "rm" tool from the path rather than
+  using the feisty meow alias.  a trash flushing feature is planned for the
+  somewhat near future.
+
+  regenerate:
+  runs the feisty meow reconfiguration process to adapt to a new version of
+  the scripts.  this also updates the current shell's functions and aliases
+  to reflect any changes.
+
+  get_feisty:
+  update the feisty meow codebase from its origin and run the regeneration
+  script to update the current user's feisty meow configuration.
 
 revision control commands
 =========================
index 674d62894f3c6aa25a8ed48ad8906f47528f9c5d..ed1724a5e405d5a3bf8fa6b5cb4b08bcd270a069 100644 (file)
@@ -43121,4 +43121,220 @@ arise.
   -- Khenchen Thrangu, "Essential Practice: Lectures on Kamalashīla’s
      Stages of Meditation in the Middle Way School", published by Shambhala
      Publications
+~
+    When they related this to Buddha, he poured water into a little vessel and
+asked, “Will this water remain without evaporating?” Because India is very
+hot, the Hearers thought, “In a few days the water will evaporate.  This
+must mean that our virtue will not remain at all.” They were extremely
+worried.  Then Buddha asked, “If this water is poured in the ocean, how long
+will it stay?  It will remain until the ocean itself evaporates.”
+    Therefore, if you do not just leave this virtue, but dedicate it, making a
+prayer petition that it become a cause of help and happiness for limitless
+sentient beings, then until that actually occurs, the virtue will not be lost.
+Like a small amount of water poured into the ocean, which will last until the
+ocean itself dries up, so the fruit of your virtue will remain until it has
+ripened.  The benefit of hearing, thinking, and meditating, in terms of
+causing all persons to possess happiness and the causes of happiness, is
+inconceivable, but if it is not dedicated, then when anger arises, it will be
+destroyed.  This benefit cannot be seen with the eye, but it is inconceivable.
+    -- Kensur Lekden, from "Meditations of a Tibetan Tantric Abbot: The Main
+       Practices of the Mahayana Buddhist Path", translated and edited by
+       Jeffrey Hopkins, published by Shambhala Publications
+~
+Because you need to obtain the happy effects and the causes producing them,
+and because it is necessary for yourself and others to attain them, you must
+meditate.  In this world there were nihilists who said that one should not
+meditate, doing only those activities that will bring about marvelous
+happiness, comfort, and prosperity in this lifetime.  The nihilists said that
+one should gather possessions and clothing, and if one’s body is sick, one
+should take medicine, that these activities were justified, but that nothing
+else was needed.  Such a philosophy appeared in the world and with respect to
+it there is this Buddhist teaching: You need a job for your livelihood, you
+need to work for the sake of your country, for the sake of yourself and
+others, to set up factories, to plant fields; still you should act mainly for
+the sake of your future life, because you will not always remain in this
+lifetime.  All persons will definitely die, and the time of death is
+indefinite.  At the time of death, nothing helps except religious practice.
+This is how it is.  Therefore, even though you need happiness and comfort in
+this life and even though it is necessary to strive for the sake of food and
+drink now, this lifetime is short.  Our longest condition of life is our
+countless future lives.  If you consider only this which you can see now and
+you do not consider all the future lives which you cannot see, you will incur
+immeasurable fault.  You will harm yourself.
+    -- Kensur Lekden, from "Meditations of a Tibetan Tantric Abbot: The Main
+       Practices of the Mahayana Buddhist Path", translated and edited by
+       Jeffrey Hopkins, published by Shambhala Publications
+~
+The ground of primal wisdom
+Where the truth beyond all concepts is beheld
+Is reached more easily by humans than by gods.
+The essence also of the deep path of the Vajrayāna
+Is more easily attained by those who find a human form.
+The basis of the Dharma of both great and lesser vehicles
+Is said to be supremely noble--
+This human state endowed with freedoms and advantages.
+
+Just like a beggar who has chanced upon a treasure of great price,
+Reflect with joy upon your freedoms and advantages.
+In doubt and apprehension that you might be dreaming,
+Implement the sacred Dharma--
+Source of happiness and benefit in this and future lives!
+  -- Longchenpa, from "Finding Rest in the Nature of the Mind", published
+     by Shambhala Publications
+~
+This lifetime passes like the weeping clouds
+Where dance the lightning garlands of the Lord of Death,
+And from them, day and night, there falls
+An endless rain to bathe the shoots
+That grow in the three levels of existence.
+
+The world and its inhabitants will pass.
+The universe is formed and then destroyed
+By seven fires, a flood, and then the scattering wind.
+The all-encircling sea, the continents,
+And even mighty Sumeru compounded of four jewels,
+All girded by the rings of lesser peaks--all this will pass.
+The time will come when all will have dissolved
+Into a single space.
+Remember this and practice Dharma from your heart.
+  -- Longchenpa, from "Finding Rest in the Nature of the Mind", published
+     by Shambhala Publications
+~
+    The most important thing is to have faith and trust in the Buddha’s
+words.  The Buddha’s teachings were not taught to deceive us but to explain
+the way things actually are.  Many people try to analyze the Buddha’s
+teachings, but how is it possible to scrutinize a buddha’s qualities?  We
+don’t even know what will happen tomorrow, or when we will die, or anything
+about our future lives, so how could we possibly examine the teachings of the
+Omniscient One?  Since we are totally obscured by our strong disturbing
+emotions, in order to progress on the path toward enlightenment, we have no
+choice but to have faith in the Buddha’s teachings and apply them in our own
+lives.
+    The ability to practice Dharma depends on certain conditions.  For
+example, this is a rare time during which the teachings of the Great
+Perfection are said to flourish.  We’re very fortunate that through
+Padmasambhava’s blessings, such teachings have appeared and we’re able to
+receive them.  We must have accumulated incredible merit and made fervent
+prayers very sincerely over numerous lifetimes to be able to encounter such
+amazing teachings now.  Still, most people are just too involved in worldly
+activities to have time to practice the Dharma, and very few people in this
+world totally dedicate themselves to the teachings.  Most people work for the
+sake of success in this life, to gain wealth, fame, power, and so on, but none
+of these worldly aims can liberate us from the suffering of samsara; in fact,
+they only create further conditions for ensuring that we remain in samsara for
+countless lifetimes to come.
+  -- Penor Rinpoche, from "An Ocean of Blessings: Heart Teachings of Drubwang
+     Penor Rinpoche", translated by Ani Jinba Palmo, published by Shambhala
+     Publications
+~
+    "When the sun comes out and illumines the world, its image is reflected in
+all clean vessels of water, being in all places without coming or going.  If
+one vessel breaks, then the reflection of the sun does not appear in it.  Do
+you think it is the fault of the sun that its reflection does not appear
+there?"
+    "No--it is just because the vessel is broken; it’s no fault of the sun."
+    "The knowledge of realization of Thusness, buddha-knowledge, is also like
+this, appearing throughout the cosmos, without before or after: Buddha appears
+in the clean mind-vessels of all sentient beings.  If the mind-vessel is
+always clean, the embodiment of Buddha is always seen; if the mind is
+polluted, the vessel breaks and the Buddha cannot be seen."
+  -- from "The Flower Ornament Scripture: A Translation of The Avatamsaka
+     Sutra", translated by Thomas Cleary, published by Shambhala Publications
+~
+Why is endeavor necessary?  If we consider material progress, we see that
+research started by one person can always be continued by another.  But this
+is not possible with spiritual progress.  The realization we talk about in the
+Buddhadharma is something that has to be accomplished by the individual.  No
+one else can do it for us.  Of course, it would be wonderful if in the future
+we could attain realization through some sort of new injection or by means of
+a new generation of computers, without having to go through any difficulties.
+If we could be absolutely certain that such a time would come, we could simply
+lie back and wait to get enlightened.  But I doubt that this will ever happen.
+It is better to make an effort.  We have to develop endeavor.
+
+    1.
+    Thus with patience I will strive with diligence.
+    For in such diligence enlightenment is found.
+    If no wind blows, then nothing stirs,
+    And neither is there merit without diligence.   
+
+  -- H.H. the Fourteenth Dalai Lama, from "The Bodhisattva Guide: A Commentary
+     on The Way of the Bodhisattva", The Bodhisattva Guide was originally
+     published as For the Benefit of All Beings, also published by Shambhala
+     Publications
+~
+        I am not angry with my bile and other humors—
+        Fertile source of suffering and pain!
+        So why should living beings give offence,
+        They likewise are impelled by circumstance?
+
+    Suffering may result from both animate and inanimate causes.  We may curse
+inanimate things like the weather, but it is with animate beings that we most
+often get angry.  If we analyze these animate causes that make us unhappy, we
+find that they are themselves influenced by other conditions.  They are not
+making us angry simply because they want to.  In this respect, because they
+are influenced by other conditions, they are in fact powerless.  So there is
+no need to get angry with them.
+
+  -- H.H. the Fourteenth Dalai Lama, from "The Bodhisattva Guide: A
+     Commentary on The Way of the Bodhisattva", published by Shambhala
+     Publications
+~
+I am not contained between my hat and boots.
+  --Walt Whitman
+~
+These delightful mountain solitudes
+Are like the family estate to the supreme guide’s heirs,
+And, as the best of protectors himself has said,
+To rely on solitude is indeed the pinnacle of joys!
+
+Forests, hermitages, and isolated dwelling places—
+These are the outer solitude of the Victor’s heirs.
+Avoiding selfishness and fainthearted fears—
+This is the bodhisattvas’ internal isolation.
+
+Keeping, therefore, to outer forms of solitude,
+Tame the inner afflictions through tranquility and insight
+And aspire to the supreme conduct of Samantabhadra—
+Possessing such good fortune one is truly the Buddha’s heir.
+
+With sweetly cascading mountain streams,
+Rocky mountain shelters ascending to heaven,
+And gently falling dewdrops of whitest moonlight,
+This mountain retreat surpasses even the deva realm.
+
+The dance of the slender trees does not stir the passions,
+And sweet birdsong brings neither attachment nor aversion,
+Enveloped in nonconceptuality’s gentle, cooling shade—
+Such youthful companionship is surely better than a silent void!
+
+Undisturbed by noisy chatter, that thorn in meditation’s side,
+Alone in this excellent place of unattended solitude,
+The old monkey of the mind has nowhere left to roam
+And, settling down within, finds satisfaction.
+
+Under the bright, oppressive sunlight of busy, bustling crowds,
+Our faults and unhelpful thoughts eclipse the constellations,
+But when embraced by threefold solitude’s cooling nectar beams,
+Such faults can easily be overcome through proper antidotes.
+
+When it is undisturbed by rippling thoughts of sadness,
+The pool-like surface of the mind is still, unmoving,
+And faith and compassion’s reflections readily arise.
+In such constancy, what need is there for a companion?
+
+If the mirror of mind is wiped clean, time and again,
+And uncluttered with objects or circumstances,
+Study, reflection, and meditation present a clear impression.
+What is there to prevent the dawn of Dharma’s light?
+
+Hunger, thirst, cold, and the like—all forms of physical affliction—
+Together with sadness, fear, and all such mental suffering,
+Can, through the teachings, enhance the purifying path
+And, unburdened by avoidance or indulgence, adorn the mind!      
+
+  -- Patrul Rinpoche, from "Beyond the Ordinary Mind: Dzogchen, Rimé, and the
+     Path of Perfect Wisdom", Translated by Adam Pearcey, published by
+     Shambhala Publications
+
 
index eec83fb4d673eca7cfef031d85c55b9728055658..b8965d612a5218dd42065616002fc136233e2961 100644 (file)
@@ -3,7 +3,7 @@
 # specifies the version of the code that is being constructed here.
 major=2
 minor=140
-revision=106
+revision=111
 build=420
 
 # specifies the remainder of the version record info.
index 2b285a6d0a402023742d41316f884aee6cb0b7ec..71db45c80c026657b05807c7a7e7b657070f55d9 100644 (file)
@@ -1,7 +1,7 @@
 <!DOCTYPE html>
 <html>
   <head>
-    <meta content="text/html; charset=windows-1252" http-equiv="content-type">
+    <meta http-equiv="content-type" content="text/html; charset=windows-1252">
     <title>Cake LAMP VM Documentation</title>
   </head>
   <body>
@@ -11,7 +11,7 @@
         Koeritz</span><span style="font-family: Comic Sans MS;"></span><span style="font-family: Comic Sans MS;"></span><br>
       <span style="font-family: Comic Sans MS;">feisty meow® concerns ltd</span>.</div>
     <h3 style="   text-align: center;"> Vintage: cakelampvm v002 &nbsp;&nbsp;
-      Updated: 2017-11-20 (rev. g)</h3>
+      Updated: 2018-2-7 (rev. j)</h3>
     <p>The cakelampvm project provides a Virtualbox VM that acts as an "internet
       in a bottle", serving up your web sites securely and only to your local
       host.&nbsp; The virtual machine provides DNS services (<a target="_blank"
         title="saco design" href="http://sacodesign.com">Saco Design</a> of <a
         target="_blank" title="winterport" href="http://www.winterportmaine.gov/">Winterport,
         Maine</a>.</p>
-    <p>Commands preceded by an octothorpe ('#') below are intended to be typed
-      into a bash shell running on the cakelampvm virtual machine.&nbsp; The
-      bash shell can be obtained either by logging into the VM through ssh or by
-      logging in directly to the Virtualbox VM console.&nbsp; You may find the
-      ssh session more convenient, because copy &amp; paste features work as
-      expected.</p>
+    <p>Commands in fixed-width bold below are intended to be typed into a bash
+      shell running on the cakelampvm virtual machine.&nbsp; The bash shell can
+      be obtained either by logging into the VM through ssh or by logging in
+      directly to the Virtualbox VM console.&nbsp; You may find the ssh session
+      more convenient, because copy &amp; paste features work as expected.</p>
     <p>Commands preceded by a greater-than symbol ('&gt;') are intended to be
       run on the Host PC in a Windows command prompt (or in a bash prompt
       running on the Host PC).</p>
@@ -48,8 +47,7 @@
           target="_blank" title="not just in the garden" href="https://www.gnome.org/">gnome
           display manager</a></li>
       <li>Main VM User: developer (password distributed separately)</li>
-      <li>Database Access: mysql root account, password: (password distributed
-        separately)</li>
+      <li>Database Access: mysql root account (password distributed separately)</li>
     </ul>
     <h2>How to set up virtualbox for your host PC<a id="#virtualbox-setup" name="#virtualbox-setup"></a></h2>
     <ol>
@@ -99,7 +97,8 @@
         IPv4 Network Mask: 255.255.255.0<br>
         IPv6 Address: (leave blank)<br>
         IPv6 Prefix Length: 0<br>
-        Virtualbox will fill in the other details like so:<br>
+        Virtualbox will fill in the other details like so (this dialog may
+        differ between versions of virtualbox):<br>
         <p><img alt="host only network adapter" src="images/host_only_network_adapter.png"></p>
       </li>
       <li>Set the "DHCP Server Settings" to disabled, e.g.<br>
         Network CIDR: 10.0.2.0/24<br>
         Supports DHCP: checked<br>
         Supports IPv6: optionally checked<br>
-        These are my settings, with IPv6 left disabled:<br>
+        These are my settings, with IPv6 left disabled (this dialog may differ
+        between versions of virtualbox):<br>
         <img alt="nat net config" src="images/nat_network_config.png"></li>
     </ol>
     <h2>Starting up the VM and Connecting to It<a id="#start-vm" name="#start-vm"></a></h2>
+    <p>&#9733; This section requires that the VM is already configured properly for
+      Host-Only and NAT networks.</p>
     <p>Using the Virtualbox interface, you should now be able to start your
       virtual machine.&nbsp; Virtualbox will complain if it detects any
       remaining configuration problems in the VM.&nbsp; The Linux boot sequence
     is generally more useful to connect to the cakelampvm over ssh.&nbsp; If the
     networking has been established properly, you should be able to do this
     with:
-    <pre># ssh developer@10.28.42.20&nbsp;  # or the equivalent with your ssh client</pre>
+    <pre><span style="font-weight: bold;">ssh developer@10.28.42.20<br># or perform the equivalent connection with your ssh client.</span></pre>
     <p>And then provide the password to log in.</p>
-    <p>Once the DNS services are set up (discussed in detail below), you will be
-      able to run the much friendlier command:</p>
-    <pre># ssh developer@cakelampvm.com</pre>
+    <p>
+      <meta http-equiv="content-type" content="text/html; charset=utf-8">
+    </p>
+    <p>
+      <meta charset="utf-8">
+      &#9733; It is very important that the ssh connection is working properly before
+      proceeding to other configuration steps.&nbsp; If ssh is not working, try
+      pinging the host:</p>
+    <pre><b>ping 10.28.42.20</b></pre>
+    <p>If the ping is also failing, then please re-check the two network
+      configuration sections above (for Host-Only networking and NAT
+      networking).&nbsp; These are both required for the VM's network to
+      function as designed.</p>
+    <p>Optional: Once the DNS services are set up (discussed in detail below),
+      you will be able to run the much friendlier command:</p>
+    <pre><span style="font-weight: bold;">ssh developer@cakelampvm.com</span></pre>
     <h4>Key Forwarding to the VM</h4>
     <p>It is important to set up ssh key forwarding to enable your use of git
       repositories while logged into the VM.&nbsp; Key forwarding should be
       enabled for the VM's two fake host identities:</p>
-    <pre>cakelampvm.com<br>10.28.42.20</pre>
+    <pre><span style="font-weight: bold;">cakelampvm.com<br>10.28.42.20</span></pre>
+    <p>The details of configuring ssh key forwarding vary for each ssh
+      client.&nbsp; For Linux ssh, the <b>~/.ssh/config</b> file might contain
+      this information:</p>
+    <pre><b>Host cakelampvm.com 10.28.42.20<br>&nbsp; ForwardAgent yes<br></b></pre>
+    <pre><span style="font-weight: bold;"></span></pre>
     <h2>Updating cakelampvm to the Latest Model<a id="#update-vm" name="#update-vm"></a></h2>
+    <p>&#9733; This section requires that the VM is already configured and is
+      accessible via ssh.</p>
     <p>The cakelampvm v002 is released with the intention that it not need to be
       released again.&nbsp; Version 001 was not built with that explicit
       intention, which then required the release of Version 002.&nbsp; But we
     <p>There is an update feature built into the VM that is quite easy to
       use.&nbsp; The updates are driven by the feisty meow script repository in
       conjunction with a local scripted command.&nbsp; To activate the "update
-      process" for your VM, run the following commands on the VM (without the
-      initial '#' symbol):</p>
-    <pre># rpuffer $FEISTY_MEOW_APEX&nbsp;&nbsp; # updates to the latest version of feisty meow
-# revamp_cakelampvm&nbsp;&nbsp;&nbsp;        # enacts any configuration changes needed,<br>                              # plus fixes web folder and other permissions.</pre>
+      process" for your VM, run the following commands on the VM, logged in as
+      the <i>developer</i> user:</p>
+    <pre><span style="font-weight: bold;"># update to the latest version of feisty meow.<br>rpuffer $FEISTY_MEOW_APEX; regenerate<br># enact any configuration changes needed, such as permissions and account setup.
+revamp_cakelampvm</span></pre>
+    <span style="font-weight: bold;"> </span>
     <p>These two commands can be run at any time to patch up your VM to the
-      latest.</p>
-    <p>The first command ("rpuffer ...") is also useful on its own for getting
-      the latest version of the feisty meow code.&nbsp; Run it again if there
-      are bug fixes you need for any of the scripts or if you would like the
-      most up-to-date cakelampvm documentation.</p>
+      latest configuration.</p>
+    <p>Recent versions of feisty meow support a new "<span style="font-weight: bold; font-family: monospace;">get_feisty</span>"
+      command, which will behave the same as the first line above.&nbsp; Once
+      you have run the "puffer..." command above for the first time (on
+      cakelampvm v002), this new command becomes available.</p>
+    <ul>
+      <li>The "<span style="font-weight: bold; font-family: monospace;">get_feisty</span>"
+        command is useful in its own right for getting the latest version of the
+        feisty meow code; run it again if you need bug fixes or if you want the
+        most recent cakelampvm documentation.</li>
+      <li>The "<span style="font-weight: bold; font-family: monospace;">revamp_cakelampvm</span>"
+        command can be used to repair many situations when the cakelampvm has
+        gone astray, especially for problems with permissions.</li>
+    </ul>
     <h2>First Tasks as the Developer User</h2>
-    <p>Here are some first steps that will make the vm your own:</p>
+    <p>&#9733; This section requires that the VM is already configured and is
+      accessible via ssh.</p>
+    <p>Here are some first steps that will make the vm your own.</p>
     <ol>
       <li>Change your password for the developer account.&nbsp; (This may
         eventually be required and automatic.)&nbsp; First, log into the VM with
         ssh.&nbsp; Then type this command:<br>
-        <pre># passwd</pre>
+        <pre><span style="font-weight: bold;">passwd</span></pre>
         The 'passwd' command will ask for your current password, and then for a
         new password plus a verification of that new password.<br>
+        You will probably want to change your samba password as well, which is
+        used when accessing the virtual machine over the network.&nbsp; This is
+        a different, but very similar, command on Linux:<br>
+        <pre><span style="font-weight: bold;">smbpasswd</span></pre>
         &nbsp;</li>
       <li>Change your git configuration for the user and email address.&nbsp;
         This is how we've configured it so far:<br>
-        <pre># git config --global user.email "developer@cakelampvm.com"</pre>
-        <pre># git config --global user.name "Developer J. Cakemo"</pre>
+        <ul>
+          <li>
+            <pre><span style="font-weight: bold;">git config --global user.email "developer@cakelampvm.com"</span></pre>
+          </li>
+          <li>
+            <pre><span style="font-weight: bold;">git config --global user.name "Developer J. Cakemo"</span></pre>
+          </li>
+        </ul>
         If you're developing on a real project, you probably don't want the
         bogus email and even more bogus name above attached to your
         commits.&nbsp; Just run the two commands again but with proper values.</li>
@@ -219,16 +263,9 @@ meow
         meow command reference</a> file.</p>
     <p>(The feisty meow codebase is already configured for the developer account
       on the cakelampvm virtual machine.)</p>
-    <h2>X11 applications launched from the VM</h2>
-    <p>[incomplete section]</p>
-    <p>If a feature called "X forwarding" is enabled in your ssh client, then
-      you can start graphical applications on the VM and display them on your
-      local machine.&nbsp; This works right away on most Linux hosts, but can
-      also work on PCs with X window system installed.&nbsp; This section
-      describes how to set up Cygwin to run X server, which enables X11
-      forwarding to your local display.</p>
-    <p>...{insert that info}...</p>
     <h2>Using the guest VM's DNS services<a id="#dns-from-vm" name="#dns-from-vm"></a></h2>
+    <p>&#9733; This section requires that the VM is already configured and is
+      accessible via ssh.</p>
     <p>The cakelampvm has been set up to provide a DNS server which will answer
       name lookup requests on any of the sites that the cakelampvm is hosting
       for you.&nbsp; It will also serve as a general DNS server for any other
@@ -239,11 +276,11 @@ meow
       10.28.42.20.&nbsp; (The DNS server can be tested with nslookup, dig and
       other tools.)</p>
     <p>Note that the cakelampvm DNS should be listed first, if one intends to
-      override any DNS names that actually exist out on the internet.&nbsp; Further,
-      we have found it most effective to have *only* the cakelampvm as your DNS
-      server, because a secondary DNS server can "take over" providing the name
-      lookups, and thus foul up DNS requests that should succeed for your
-      VM-hosted sites.</p>
+      override any DNS names that actually exist out on the internet.&nbsp;
+      Further, we have found it most effective to have *only* the cakelampvm as
+      your DNS server, because a secondary DNS server can "take over" providing
+      the name lookups, and thus foul up DNS requests that should succeed for
+      your VM-hosted sites.</p>
     <p>If your Host PC is running Windows, see the DNS configuration section
       below that is tailored to that operating system.</p>
     <p>Important Note: It behooves you to remember to switch back to a normal
@@ -255,8 +292,9 @@ meow
       both the cakelampvm VM and on your host PC.&nbsp; Note: ping on Linux
       keeps going forever, so hit control-C when you are tired of seeing the
       pings:</p>
-    <pre># ping cakelampvm.com</pre>
-    <pre># ping mapsdemo.cakelampvm.com</pre>
+    <pre><span style="font-weight: bold;">ping cakelampvm.com</span></pre>
+    <span style="font-weight: bold;"> </span>
+    <pre><span style="font-weight: bold;">ping www.cakelampvm.com</span></pre>
     <p>Note that any other answer than 10.28.42.20 for the address is *bzzzt*
       wrong, and means something needs to be fixed.</p>
     <p>If these pings succeed (which hopefully they will!), then try accessing
@@ -271,7 +309,7 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com</a></pre>
     <h4>Setting up DNS on Windows<a id="#windoze-dns" name="#windoze-dns"></a></h4>
     <p>The ipconfig tool will provide helpful information about your current
       networking and DNS configuration:</p>
-    <pre>&gt; ipconfig /all</pre>
+    <pre><span style="font-weight: bold;">&gt; ipconfig /all</span></pre>
     <p>The DNS configuration on Windows is somewhat byzantine.&nbsp; The pipe
       characters ('|') below are used to separate the menus or tabs or dialogs
       to traverse.&nbsp; Follow this path to get to the DNS config:</p>
@@ -289,12 +327,12 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com</a></pre>
       settings on your Host PC are right, then you may need to flush your DNS
       cache, and that might be sufficient to start getting the right IP
       address.&nbsp; On Windows, the command for flushing DNS is:</p>
-    <pre>&gt; ipconfig /flushdns</pre>
+    <pre><span style="font-weight: bold;">&gt; ipconfig /flushdns</span></pre>
     <p>and on Linux the flush DNS command can be many different things, but try
       these two most common options:</p>
-    <pre># sudo service dns-clean restart&nbsp;&nbsp; # restarts the client side DNS cache.</pre>
+    <pre><span style="font-weight: bold;"># restarts the client side DNS cache.<br>sudo service dns-clean restart</span></pre>
     <p>or</p>
-    <pre># sudo service nscd restart&nbsp;&nbsp; # restarts the nscd caching server.</pre>
+    <pre><span style="font-weight: bold;"># restarts the nscd caching server.<br>sudo service nscd restart</span></pre>
     After, this try the pings again.&nbsp; If they still fail, please go back
     over your DNS configuration very carefully.&nbsp; The cakelampvm's DNS
     feature *does* actually work, but operating systems sometimes do their best
@@ -357,7 +395,7 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com</a></pre>
     <p>If you run into any permission problems that prevent file access, either
       remotely or within the VM itself, then try running this command to fix
       them (repeated from the section above about updating the cakelampvm):</p>
-    <pre># revamp_cakelampvm</pre>
+    <pre><span style="font-weight: bold;">revamp_cakelampvm</span></pre>
     <p>Afterwards, the www folder and others should allow the developer user to
       create new folders at will.</p>
     <h2>Accessing files on the host PC from the guest VM<a id="#samba-shares" name="#samba-shares"></a></h2>
@@ -373,9 +411,126 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com</a></pre>
         shared, and give it a name for the guest.&nbsp; We assume the folder
         name will be "myshare".</li>
       <li>On the guest vm, run the following commands to mount the share:<br>
-        <pre># mkdir ~/shared&nbsp;&nbsp;&nbsp; # for the guest's version of the shared folder<br># sudo mount -t vboxsf myshare ~/shared&nbsp;&nbsp;&nbsp; # mount the vm's share name onto the folder on the vm.</pre>
+        <pre><span style="font-weight: bold;"># make the guest's version of the shared folder<br>mkdir ~/shared<br># mount the vm's share name onto the folder on the vm.<br>sudo mount -t vboxsf myshare ~/shared</span></pre>
       </li>
     </ol>
+    <h2>X11 applications launched from the VM</h2>
+    <p>[incomplete section]</p>
+    <p>If a feature called "X forwarding" is enabled in your ssh client, then
+      you can start graphical applications on the VM and display them on your
+      local machine.&nbsp; This works right away on most Linux hosts, but can
+      also work on PCs with X window system installed.&nbsp; This section
+      describes how to set up Cygwin to run X server, which enables X11
+      forwarding to your local display.</p>
+    <p>...{insert that info}...</p>
+    <h2>Handy Techniques for Using cakelampvm</h2>
+    <h3>Assorted Guides and Cheat-Sheets</h3>
+    <p>A Cheat sheet for the Vim editor (there are many of these available): <a
+        target="_blank" title="vim commands" href="https://vim.rtorr.com/">https://vim.rtorr.com/</a></p>
+    <p>A git branching model that seems to work well: <a target="_blank" title="release and patch process"
+        href="http://nvie.com/posts/a-successful-git-branching-model/">http://nvie.com/posts/a-successful-git-branching-model/</a></p>
+    <p>This is a basic guide to the Google Developer Console and API Key
+      management: <a target="_blank" title="apis and creds at google" href="https://feistymeow.org//feisty_meow/documentation/google_apis/google_apis_and_credentials.pdf">Google
+        API Docs</a>&nbsp; </p>
+    <h3>Using the "meld" Tool to Compare Files &amp; Directories</h3>
+    <p>Meld is a great comparison tool that displays differences between two
+      files or directories or directory trees in a graphical view.&nbsp; Meld is
+      pre-installed on the VM.&nbsp; This tool can be launched either in the
+      VM's X Windowing System (on the console) or if X11 forwarding is enabled.</p>
+    <p>To run meld, just type this command:</p>
+    <pre><span style="font-weight: bold;">meld A B</span></pre>
+    <p>where A and B are either both file names or they are both directory
+      names.&nbsp; If A and B are directories, meld will compare the entire tree
+      structure between the two directories.&nbsp; It allows one to copy from
+      one side to the other, even if the item that needs to be copied is an
+      entire subdirectory.</p>
+    <h3>Get the network address on the guest vm</h3>
+    <p>Run this command:</p>
+    <pre><span style="font-weight: bold;">ifconfig</span></pre>
+    <p>In the results, look for "<span style="font-family: monospace;">inet addr</span>".&nbsp;
+      There may be more than one, if there are multiple network interfaces.</p>
+    <p>The standard IP address is 10.28.42.20 for the cakelampvm.</p>
+    <h3>How to cleanly reboot or shut down the guest VM</h3>
+    <p>When you've got the DNS and everything integrated, these commands will
+      manage the vm's state:</p>
+    <p>First, log into the guest VM:</p>
+    <pre><span style="font-weight: bold;">ssh developer@cakelampvm.com</span></pre>
+    <p>Then, to reboot the guest VM:</p>
+    <pre><span style="font-weight: bold;">sudo reboot</span></pre>
+    <p>Or, to halt the guest VM:</p>
+    <pre><span style="font-weight: bold;">sudo shutdown -h now</span></pre>
+    <p>Using these commands is kinder to the VM than just cycling the power from
+      the Virtualbox control panel.</p>
+    <h1>Gritty Details of the Nitty Variety<a id="#nitty-gritty" name="#nitty-gritty"></a></h1>
+    <p>This is the lowest level of plumbing for your VM.&nbsp; Hopefully you
+      will not need to engage with this section.&nbsp; The most useful doc
+      section here is the one below about the "Virtualbox guest additions",
+      which you will probably need at some future point.&nbsp; Oracle releases
+      updates to the guest additions fairly regularly.</p>
+    <h2>Configuring the guest VM</h2>
+    <p>The guest VM should already be set up appropriately.&nbsp; These steps
+      are provided for reference and updates.</p>
+    <h3>Set up Virtualbox guest additions for the VM</h3>
+    This procedure is needed if the guest provides an older or incompatible
+    version of the guest additions (which have already been installed on the
+    guest vm).&nbsp; It may also be necessary when a new version of the guest
+    additions becomes available.
+    <ol>
+      <li>To install the guest additions, open the guest VM and have its window
+        in focus.</li>
+      <li>Choose the "Devices" menu and select "Insert Guest Additions CD
+        Image".&nbsp; This will mount the CD's ISO image on the VM.</li>
+      <li>On the guest VM, it may be necessary to mount the CD image that's now
+        available:<br>
+        <pre><span style="font-weight: bold;">sudo mount /dev/sr0 /media/cdrom</span></pre>
+        <p>Linux will mention that the device is mounted "read-only".</p>
+      </li>
+      <li>Since the VM currently has no windowing system installed, one must
+        start the Guest Additions install manually:<br>
+        <pre><span style="font-weight: bold;">cd /media/cdrom<br>sudo sh VBoxLinuxAdditions.run</span></pre>
+      </li>
+      <li>The latest Virtualbox guest additions should now be installed.</li>
+    </ol>
+    <h3>Set up network adapters on guest VM</h3>
+    <p>The network interfaces should already be configured on the guest within
+      the Virtualbox configuration.&nbsp; This is available by clicking on the
+      VM in the Virtualbox manager and selecting "Settings".&nbsp; These are the
+      configuration settings used:</p>
+    Adapter 1:<br>
+    &nbsp; Attached to: Host-only Adapter<br>
+    &nbsp; Name: vboxnet0&nbsp; <br>
+    <p>Adapter 2:<br>
+      &nbsp; Attached to: Nat Network<br>
+      &nbsp; Name: NatNetwork</p>
+    <p>On the guest VM itself, the network settings are specified in a file
+      called /etc/network/interfaces.&nbsp; Here are the current contents of
+      that file:</p>
+    <pre>source /etc/network/interfaces.d/*<br><br>auto lo<br>iface lo inet loopback<br><br>auto enp0s3<br>iface enp0s3 inet static<br>&nbsp; address 10.28.42.20<br>&nbsp; netmask 255.255.255.0<br>&nbsp; network 10.28.42.0<br>&nbsp; broadcast 10.28.42.255<br>&nbsp; dns-domain cakelampvm.com<br>&nbsp; dns-search cakelampvm.com<br>&nbsp; dns-nameservers 127.0.0.1 8.8.8.8</pre>
+    <pre>auto enp0s8</pre>
+    <pre>iface enp0s8 inet dhcp</pre>
+    <p> </p>
+    <h3>Compacting the VM Disk Image</h3>
+    <p>To minimize the size used for the disk image, there are three major
+      steps.</p>
+    <p>1. While running the VM, run this command:</p>
+    <pre><span style="font-weight: bold;">sudo apt clean</span></pre>
+    <p>This throws away any cached data from the apt tool, which can be
+      substantial.</p>
+    <p>If there are other junk files you know of that can be removed, delete
+      those now also.</p>
+    <p>2. Reboot the VM to the gparted ISO image (available at the <a target="_blank"
+        title="great free partition editor" href="https://gparted.org/livecd.php">gparted
+        site</a>) and run the following command:</p>
+    <pre><span style="font-weight: bold;">sudo zerofree /dev/sda</span></pre>
+    <p>This sets all free space to the zero byte, enabling Virtualbox to free
+      that space in the next step.</p>
+    <p>3. Shut the vm down after zerofree is complete and run this command on
+      the host PC (this is the Linux version of the command):</p>
+    <pre><span style="font-weight: bold;">VBoxManage modifyhd --compact ~/cake_lamp_vm/cake-lamp-vm-hd.vdi</span></pre>
+    <p>Replace the <span style="font-family: monospace;">~/cake_lamp_vm</span>
+      path with the real VM storage path.&nbsp; This command compacts the root
+      (and only) partition of the VM.</p>
+    <p>After these steps are complete, the VM should be its minimal size.</p>
     <h2>Adding a new website and domain on the guest VM</h2>
     <p>Note: these instructions, even the quick approaches below, pale in
       comparison to the ease of use of the "standup" command in feisty meow's
@@ -404,18 +559,18 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com</a></pre>
     details on how to add a containing domain for the first time.
     <h4>Quick approach: Use the feisty meow "add_domain" command.</h4>
     <p>Run this command in a bash shell on the VM:</p>
-    <pre># add_domain excalibur.cakelampvm.com</pre>
+    <pre><span style="font-weight: bold;">add_domain excalibur.cakelampvm.com</span></pre>
     <p>Done.</p>
     <h4>Manual approach: Edit the bind9 configuration.</h4>
     <p>Note: the manual approach is not compatible with later use of feisty
       meow's "remove_domain".</p>
     Execute the following command to edit the DNS file for the cakelampvm
     domain:
-    <pre># sudo vi /etc/bind/cakelampvm.com.conf</pre>
+    <pre><span style="font-weight: bold;">sudo vi /etc/bind/cakelampvm.com.conf</span></pre>
     <p>Add a stanza for the new site at the end of this file:</p>
     <pre>excalibur.cakelampvm.com.&nbsp;&nbsp;&nbsp; IN A&nbsp;&nbsp;&nbsp; 10.28.42.20<br>&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; IN HINFO "linux server" "ubuntu"</pre>
     <p>Restart the DNS server:</p>
-    <pre># sudo service bind9 restart</pre>
+    <pre><span style="font-weight: bold;">sudo service bind9 restart</span></pre>
     <p>Afterwards, pinging excalibur.cakelampvm.com should work from both the
       guest VM and the host PC.</p>
     <h3>DNS Option B: Using an entirely new domain for the site</h3>
@@ -424,7 +579,7 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com</a></pre>
       this example, we need to add the site "excalibur.tv" into the DNS.</p>
     <h4>Quick approach: Use the feisty meow "add_domain" command.</h4>
     Run this command in a bash shell on the VM:
-    <pre># add_domain excalibur.tv</pre>
+    <pre><span style="font-weight: bold;">add_domain excalibur.tv</span></pre>
     <p>Done.</p>
     <h4>Manual approach: Edit a new DNS config file</h4>
     <p>Note: the manual approach is not compatible with later use of feisty
@@ -441,7 +596,7 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com</a></pre>
       to add the new file by adding this bit of configuration at the end:</p>
     <pre>zone "excalibur.tv" in {<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; file "/etc/bind/excalibur.tv.conf";<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; type master;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; allow-query { any; };<br>};</pre>
     <p>Restart the DNS server:</p>
-    <pre># sudo service bind9 restart</pre>
+    <pre><span style="font-weight: bold;">sudo service bind9 restart</span></pre>
     <p>Afterwards, pinging excalibur.tv should work from both the guest and the
       host.</p>
     <h3>Creating a New Apache Site</h3>
@@ -449,7 +604,7 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com</a></pre>
       developer@cakelampvm.com </p>
     <h4>Quick approach: Use the feisty meow "add_apache_site" command.</h4>
     <p>Run this command in a bash shell on the VM:</p>
-    <pre># add_apache_site excalibur excalibur.tv</pre>
+    <pre><span style="font-weight: bold;">add_apache_site excalibur excalibur.tv</span></pre>
     <p>(The first parameter is the application name, the second is the domain
       name.)</p>
     <p>Done.</p>
@@ -471,21 +626,21 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com</a></pre>
       appropriate file name that includes the site's domain name.&nbsp; We will
       call our config file "excalibur.tv.conf".&nbsp; If you developed the file
       in your home folder, this would be the command to move it up to Apache:</p>
-    <pre># sudo cp ~/excalibur.tv.conf /etc/apache2/sites-available</pre>
+    <pre><span style="font-weight: bold;">sudo cp ~/excalibur.tv.conf /etc/apache2/sites-available</span></pre>
     <p>Then tell apache to use the new file:</p>
-    <pre># sudo a2ensite excalibur.tv  # the '.conf' portion of the filename is unnecessary for this command.
+    <pre><span style="font-weight: bold;">sudo a2ensite excalibur.tv<br># the '.conf' portion of the filename is unnecessary for this command.</span>
 </pre>
     <p>Finally, restart apache to get it to begin serving the site:</p>
-    <pre># sudo service apache2 restart</pre>
+    <pre><span style="font-weight: bold;">sudo service apache2 restart</span></pre>
     <h3>Test the new web site</h3>
     <p>Given the configuration above, your host PC should now be able to access
       the new website on the domain "excalibur.tv".</p>
     <p>To test this, first try pinging the new DNS name:</p>
-    <pre># ping excalibur.tv</pre>
-    <p>If there are responses to the ping *and* the answer is 10.28.42.20, then
-      it means the DNS is working.&nbsp; If there are no responses or it's some
-      other IP address talking back, check the instructions in the above DNS
-      sections.</p>
+    <pre><span style="font-weight: bold;">ping excalibur.tv</span></pre>
+    <p>If there are responses to the ping <span style="font-weight: bold;">*and*</span>
+      the answer is 10.28.42.20, then it means the DNS is working.</p>
+    <p>If there are no responses or it's some other IP address talking back,
+      check the instructions in the above DNS sections.</p>
     <p>Once the DNS is working, try browsing to the site at "<a title="it's excalibur, wilbur!"
         href="http://excalibur.tv">http://excalibur.tv</a>".&nbsp; That should
       at least bring up the configured site storage path, even if nothing is
@@ -494,115 +649,6 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com</a></pre>
       for any error messages that can be corrected.&nbsp; The log files are
       stored in "/var/log/apache2" and are named after the website (if
       configured through the above process).</p>
-    <h2>Handy Techniques for Using cakelampvm</h2>
-    <h3>Assorted Guides and Cheat-Sheets</h3>
-    <p>A Cheat sheet for the Vim editor (there are many of these available): <a
-        target="_blank" title="vim commands" href="https://vim.rtorr.com/">https://vim.rtorr.com/</a></p>
-    <p>A git branching model that seems to work well: <a target="_blank" title="release and patch process"
-        href="http://nvie.com/posts/a-successful-git-branching-model/">http://nvie.com/posts/a-successful-git-branching-model/</a></p>
-    <p>This is a basic guide to the Google Developer Console and API Key
-      management: <a target="_blank" title="apis and creds at google" href="https://feistymeow.org//feisty_meow/documentation/google_apis/google_apis_and_credentials.pdf">Google
-        API Docs</a></p>
-    <p>&nbsp;</p>
-    <h3>Using the "meld" Tool to Compare Files &amp; Directories</h3>
-    <p>Meld is a great comparison tool that displays differences between two
-      files or directories or directory trees in a graphical view.&nbsp; Meld is
-      pre-installed on the VM.&nbsp; This tool can be launched either in the
-      VM's X Windowing System (on the console) or if X11 forwarding is enabled.</p>
-    <p>To run meld, just type this command:</p>
-    <p>#meld A B</p>
-    <p>where A and B are either both file names or they are both directory names.&nbsp;
-      If A and B are directories, meld will compare the entire tree structure
-      between the two directories.&nbsp; It allows one to copy from one side to
-      the other, even if the item that needs to be copied is an entire
-      subdirectory.</p>
-    <h3>Get the network address on the guest vm</h3>
-    <p>Run this command:</p>
-    <pre># ifconfig</pre>
-    <p>In the results, look for "<span style="font-family: monospace;">inet addr</span>".&nbsp;
-      There may be more than one, if there are multiple network interfaces.</p>
-    <p>The standard IP address is 10.28.42.20 for the cakelampvm.</p>
-    <h3>How to cleanly reboot or shut down the guest VM</h3>
-    <p>When you've got the DNS and everything integrated, these commands will
-      manage the vm's state:</p>
-    <p>First, log into the guest VM:</p>
-    <pre># ssh developer@cakelampvm.com</pre>
-    <p>Then, to reboot the guest VM:</p>
-    <pre># sudo reboot</pre>
-    <p>Or, to halt the guest VM:</p>
-    <pre># sudo shutdown -h now</pre>
-    <p>Using these commands is kinder to the VM than just cycling the power from
-      the Virtualbox control panel.</p>
-    <h1>Gritty Details of the Nitty Variety<a id="#nitty-gritty" name="#nitty-gritty"></a></h1>
-    <p>This is the lowest level of plumbing for your VM.&nbsp; Hopefully you
-      will not need to engage with this section.&nbsp; The most useful doc
-      section here is the one below about the "Virtualbox guest additions",
-      which you will probably need at some future point.&nbsp; Oracle releases
-      updates to the guest additions fairly regularly.</p>
-    <h2>Configuring the guest VM</h2>
-    <p>The guest VM should already be set up appropriately.&nbsp; These steps
-      are provided for reference and updates.</p>
-    <h3>Set up Virtualbox guest additions for the VM</h3>
-    This procedure is needed if the guest provides an older or incompatible
-    version of the guest additions (which have already been installed on the
-    guest vm).&nbsp; It may also be necessary when a new version of the guest
-    additions becomes available.
-    <ol>
-      <li>To install the guest additions, open the guest VM and have its window
-        in focus.</li>
-      <li>Choose the "Devices" menu and select "Insert Guest Additions CD
-        Image".&nbsp; This will mount the CD's ISO image on the VM.</li>
-      <li>On the guest VM, it may be necessary to mount the CD image that's now
-        available:<br>
-        <pre># sudo mount /dev/sr0 /media/cdrom</pre>
-        <p>Linux will mention that the device is mounted "read-only".</p>
-      </li>
-      <li>Since the VM currently has no windowing system installed, one must
-        start the Guest Additions install manually:<br>
-        <pre># cd /media/cdrom<br># sudo sh VBoxLinuxAdditions.run</pre>
-      </li>
-      <li>The latest Virtualbox guest additions should now be installed.</li>
-    </ol>
-    <h3>Set up network adapters on guest VM</h3>
-    <p>The network interfaces should already be configured on the guest within
-      the Virtualbox configuration.&nbsp; This is available by clicking on the
-      VM in the Virtualbox manager and selecting "Settings".&nbsp; These are the
-      configuration settings used:</p>
-    Adapter 1:<br>
-    &nbsp; Attached to: Host-only Adapter<br>
-    &nbsp; Name: vboxnet0&nbsp; <br>
-    <p>Adapter 2:<br>
-      &nbsp; Attached to: Nat Network<br>
-      &nbsp; Name: NatNetwork</p>
-    <p>On the guest VM itself, the network settings are specified in a file
-      called /etc/network/interfaces.&nbsp; Here are the current contents of
-      that file:</p>
-    <pre>source /etc/network/interfaces.d/*<br><br>auto lo<br>iface lo inet loopback<br><br>auto enp0s3<br>iface enp0s3 inet static<br>&nbsp; address 10.28.42.20<br>&nbsp; netmask 255.255.255.0<br>&nbsp; network 10.28.42.0<br>&nbsp; broadcast 10.28.42.255<br>&nbsp; dns-domain cakelampvm.com<br>&nbsp; dns-search cakelampvm.com<br>&nbsp; dns-nameservers 127.0.0.1 8.8.8.8</pre>
-    <pre>auto enp0s8</pre>
-    <pre>iface enp0s8 inet dhcp</pre>
-    <p> </p>
-    <h3>Compacting the VM Disk Image</h3>
-    <p>To minimize the size used for the disk image, there are three major
-      steps.</p>
-    <p>1. While running the VM, run this command:</p>
-    <pre># sudo apt clean</pre>
-    <p>This throws away any cached data from the apt tool, which can be
-      substantial.</p>
-    <p>If there are other junk files you know of that can be removed, delete
-      those now also.</p>
-    <p>2. Reboot the VM to the gparted ISO image (available at the <a target="_blank"
-        title="great free partition editor" href="https://gparted.org/livecd.php">gparted
-        site</a>) and run the following command:</p>
-    <pre># sudo zerofree /dev/sda</pre>
-    <p>This sets all free space to the zero byte, enabling Virtualbox to free
-      that space in the next step.</p>
-    <p>3. Shut the vm down after zerofree is complete and run this command on
-      the host PC (this is the Linux version of the command):</p>
-    <pre># VBoxManage modifyhd --compact ~/cake_lamp_vm/cake-lamp-vm-hd.vdi</pre>
-    <p>Replace the <span style="font-family: monospace;">~/cake_lamp_vm</span>
-      path with the real VM storage path.&nbsp; This command compacts the root
-      (and only) partition of the VM.</p>
-    <p>After these steps are complete, the VM should be its minimal size.</p>
     <h2>Notes on building the Cake Lamp VM</h2>
     <p>This is all work that should already have been done.&nbsp; It is
       mentioned here just as breadcrumbs for a future vm builder.</p>
@@ -625,8 +671,6 @@ href="http://mapsdemo.cakelampvm.com">http://mapsdemo.cakelampvm.com</a></pre>
       <li>Installed and configured Samba service for the guest VM.&nbsp; The
         main config file lives in "/etc/samba/smb.conf".&nbsp; Some pointers
         here: <a target="_blank" href="https://help.ubuntu.com/community/How%20to%20Create%20a%20Network%20Share%20Via%20Samba%20Via%20CLI%20%28Command-line%20interface/Linux%20Terminal%29%20-%20Uncomplicated%2C%20Simple%20and%20Brief%20Way%21">https://help.ubuntu.com/community/How%20to%20Create...</a></li>
-      <li><br>
-      </li>
     </ul>
     <p><br>
     </p>
index aaa8283b77d290095a210d1b309b9797cd16beef..b042ed8cde65a9de3d1f6bed22e6b8fdb701e785 100644 (file)
@@ -3,7 +3,8 @@
 
 Quick Start Guide for the Feisty Meow Codebase
 
-Commands that can be typed in a console or terminal are are prefixed with "#".
+Commands that can be typed in a console or terminal are are prefixed with "$".
+(Do not include the dollar sign when copying and pasting commands.)
 Information that varies by platform is prefixed with a '|' character.
 
 This documentation assumes that the code is stored in the default location:
@@ -19,20 +20,19 @@ How to get the feisty meow codebase
 | https://feistymeow.org/feisty_meow/documentation/cygwin_install_list.txt (web)
 
 Retrieve a clone of the feisty meow codebase:
-# git clone git://feistymeow.org/feisty_meow
+$ git clone git://feistymeow.org/feisty_meow
 
 ==============
 
 How to load the feisty meow script environment
 
 Set up the feisty_meow scripts; this is only needed once, when you first get
-the codebase.  It will also regenerate the scripts using the latest installed
-version.
-# bash /opt/feistymeow.org/feisty_meow/scripts/core/reconfigure_feisty_meow.sh
+the codebase.
+$ bash /opt/feistymeow.org/feisty_meow/scripts/core/reconfigure_feisty_meow.sh
 
 Connect the feisty meow scripts to your login script (in ~/.bashrc).
 Note that this actually modifies ~/.bashrc.  This step is only needed once.
-# bash /opt/feistymeow.org/feisty_meow/scripts/core/connect_feisty_meow.sh
+$ bash /opt/feistymeow.org/feisty_meow/scripts/core/connect_feisty_meow.sh
 
 | For the root user, you can pass a flag '--root' to the connect_feisty_meow
 | script.  This will add an alias for 'feistyme' which loads the feisty meow
@@ -42,13 +42,13 @@ Load the script environment into the current shell.  This can be done for
 any new shell.  This is idempotent, so it does no harm to run it again.
 Note that you should not need this step if you connected feisty meow to
 ~/.bashrc above.
-# source /opt/feistymeow.org/feisty_meow/scripts/core/launch_feisty_meow.sh
+$ source /opt/feistymeow.org/feisty_meow/scripts/core/launch_feisty_meow.sh
 
 When the feisty meow script environment loaded, many new aliases and
 functions are available for use.  These come from the $FEISTY_MEOW_SCRIPTS
 folder.
-See the full list of commands at:
-(hmmm: To be completed in 2018)
+There is a list of feisty meow script commands available at:
+https://feistymeow.org/feisty_meow/documentation/feisty_meow_command_reference.txt
 
 ==============
 
@@ -59,13 +59,25 @@ differ utility and the feisty meow customization system).  They can be
 installed with either apt-get or CPAN.
 
 Install using apt-get (on Ubuntu or Debian-based OS):
-# sudo apt-get install libfile-which-perl libtext-diff-perl
+$ sudo apt-get install libfile-which-perl libtext-diff-perl
 
 or Install using perl's CPAN:
-# sudo cpan install Text::Diff File::Which
+$ sudo cpan install Text::Diff File::Which
 
 or on Cygwin (MS-Windows), install with apt-cyg:
-# apt-cyg install perl-File-Which perl-Text-Diff
+$ apt-cyg install perl-File-Which perl-Text-Diff
+
+==============
+
+How to update the feisty meow codebase to the latest online version
+
+This assumes that a somewhat current version of feisty meow is already
+installed and the scripts are loaded (see above section for how to load).
+
+The command below retrieves the latest version of feisty meow codebase
+from the online repository and regenerates the scripts.
+
+$ rpuffer $FEISTY_MEOW_APEX ; regenerate
 
 ==============
 
@@ -75,10 +87,10 @@ These dependencies are used for building the applications, tools and tests
 in the "nucleus", "octopi", "graphiq" and other C++ collections.
 
 | Ubuntu / Debian:
-| # sudo apt-get install build-essential librtmp-dev libcurl4-gnutls-dev libssl-dev
+| $ sudo apt-get install build-essential librtmp-dev libcurl4-gnutls-dev libssl-dev
 
 | Centos / Redhat / Fedora:
-| # sudo yum install gcc gcc-c++ openssl-devel.x86_64 curl-devel
+| $ sudo yum install gcc gcc-c++ openssl-devel.x86_64 curl-devel
 
 The "kona" collection depends on Java version 8 or better.
 
@@ -91,7 +103,7 @@ The "kona" collection depends on Java version 8 or better.
 How to build the feisty meow codebase
 
 Run the following command to build the feisty meow libraries and applications.
-# produce_feisty_meow
+$ produce_feisty_meow
 
 After the build is complete, the feisty meow applications can be found in
 the folder pointed at by the $FEISTY_MEOW_BINARIES environment variable.
@@ -101,7 +113,7 @@ the folder pointed at by the $FEISTY_MEOW_BINARIES environment variable.
 How to clean up the files generated by the build
 
 This command cleans out all the generated files:
-# whack_build clean
+$ whack_build clean
 
 ==============
 
index ba2e44bedba7c5641dd21fddc9063ec4e7e0dbda..09eb72ec44246c4e87652d28ad8117c6e18d94b1 100644 (file)
@@ -55,6 +55,7 @@ fi
 # re-use work we did on 'exp' macro for the longer windows command.
 define_yeti_alias explorer=exp
 define_yeti_alias fix_ssh_perms='chmod 700 $HOME/.ssh ; chmod 600 $HOME/.ssh/*'
+define_yeti_alias get_feisty='rpuffer $FEISTY_MEOW_APEX; regenerate'
 define_yeti_alias halt='sudo shutdown -h now'
 define_yeti_alias i=inventory
 define_yeti_alias l='perl $FEISTY_MEOW_SCRIPTS/files/summing_dir.pl'
@@ -107,8 +108,9 @@ define_yeti_alias add_domain="sudo bash \$FEISTY_MEOW_SCRIPTS/system/add_domain.
 define_yeti_alias remove_domain="sudo bash \$FEISTY_MEOW_SCRIPTS/system/remove_domain.sh"
 define_yeti_alias add_apache_site="sudo bash \$FEISTY_MEOW_SCRIPTS/system/add_apache_site.sh"
 define_yeti_alias remove_apache_site="sudo bash \$FEISTY_MEOW_SCRIPTS/system/remove_apache_site.sh"
+define_yeti_alias add_swap_mount="sudo bash \$FEISTY_MEOW_SCRIPTS/system/add_swap_mount.sh"
 
-#hmmm: some magma intrusions from the fred customizations...
+# some site avenger sudoized aliases.
 define_yeti_alias revamp_cakelampvm="sudo bash \"$FEISTY_MEOW_SCRIPTS/site_avenger/revamp_cakelampvm.sh\""
 
 ##############
@@ -144,8 +146,3 @@ unalias fredme feistyme &>/dev/null
 
 ##############
 
-# set the sentinel alias that says this file was handled.
-#alias CORE_ALIASES_LOADED=true
-
-##############
-
index c60c94319e4e24d126e700465c66e9ece8edcecd..644ce8a0c575cab98eda33e6230e38fd16b8127e 100644 (file)
@@ -144,7 +144,7 @@ if [ -z "$skip_all" ]; then
   function test_or_die()
   {
     if [ $? -ne 0 ]; then
-      echo -e "\n\naction failed: $*\n\nExiting script..."
+      echo -e "\n\naction failed: $*\n\n*** Exiting script..."
       error_sound
       exit 1
     fi
@@ -154,7 +154,7 @@ if [ -z "$skip_all" ]; then
   function test_or_continue()
   {
     if [ $? -ne 0 ]; then
-      echo -e "\n\nerror occurred: $*\n\nContinuing script..."
+      echo -e "\n\nerror occurred: $*\n\n=> Continuing script..."
       error_sound
     fi
   }
@@ -452,6 +452,7 @@ if [ -z "$skip_all" ]; then
     unalias CORE_ALIASES_LOADED &>/dev/null
     unset -f function_sentinel 
     # reload feisty meow environment in current shell.
+    echo "reloading the feisty meow scripts."
     source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
     # run nechung oracle to give user a new fortune.
     nechung
@@ -928,6 +929,16 @@ return 0
 
   ##############
 
+  # site avenger aliases
+  function switchto()
+  {
+    WORKDIR="$FEISTY_MEOW_SCRIPTS/site_avenger"
+    source "$FEISTY_MEOW_SCRIPTS/site_avenger/shared_site_mgr.sh"
+    switch_to "$1"
+  }
+
+  ##############
+
   # NOTE: no more function definitions are allowed after this point.
 
   function function_sentinel()
index 2224c716e3f0e12ab664b6757919716764867169..cf1e1b0f68fef362066e74477ca46e2a43188f67 100644 (file)
@@ -81,3 +81,4 @@ if [ ! -z "$DEBUG_FEISTY_MEOW" ]; then
   echo ==============
 fi
 
+
index b64b167098c89726696ab05b7edb3ebeddf51ea4..fa4bdca9e4ce85f3b769ca712ee4386e0165fec4 100644 (file)
@@ -220,9 +220,7 @@ define_yeti_variable DEFAULT_FEISTYMEOW_ORG_DIR=/opt/feistymeow.org
   fi
   # add in any site avenger applications that are in the apps folder.
   if [ -d "$HOME/apps" ]; then
-    # first, simple projects.
-    REPOSITORY_LIST+="$(find "$HOME/apps" -iname "avenger5" -type d) "
-    # then, site avenger specific projects.
+    # back up all the apps.
     REPOSITORY_LIST+="$(find "$HOME/apps" -maxdepth 2 -mindepth 2 -iname "avenger5" -type d) "
   fi
   
diff --git a/scripts/customize/fred/scripts/games/fallout_new_vegas_link_fixer.sh b/scripts/customize/fred/scripts/games/fallout_new_vegas_link_fixer.sh
new file mode 100644 (file)
index 0000000..a9a8ed8
--- /dev/null
@@ -0,0 +1,48 @@
+#!/bin/bash
+
+# sets up links to make fallout new vegas work properly under wine.
+# some mods will look for paths that are incorrectly case sensitive, and this
+# script just sets up all those links that we believe are required.
+
+source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
+
+if [ ! -d Data ]; then
+  echo '
+This script needs to run from the "Fallout New Vegas" install directory,
+which is usually found under "steam/steamapps/common".
+'
+  exit 1
+fi
+
+function make_local_dir_link()
+{
+  dir="$1"; shift
+  name="$1"; shift
+  new_name="$1"; shift
+  pushd "$dir" &>/dev/null
+  if [ -L "$new_name" ]; then
+    echo "Skipping creation of existing link $dir/$new_name"
+    popd &>/dev/null
+    return
+  fi
+  if [ ! -d "$name" ]; then
+    echo "Skipping creation of link $dir/$new_name due to missing directory $dir/$name"
+    popd &>/dev/null
+    return
+  fi
+  ln -s "$name" "$new_name"
+  test_or_die "creating link for $dir/$new_name from $dir/$name"
+  echo "Created link $dir/$new_name from $dir/$name"
+  popd &>/dev/null
+}
+
+make_local_dir_link Data Sound sound
+make_local_dir_link Data Textures textures
+make_local_dir_link Data Meshes meshes
+make_local_dir_link Data/Meshes Landscape landscape
+make_local_dir_link Data/Meshes Weapons weapons
+make_local_dir_link Data/Sound Voice voice
+make_local_dir_link Data/Textures Landscape landscape
+make_local_dir_link Data/Textures Landscape weapons
+make_local_dir_link Data/Textures Landscape clutter
+
diff --git a/scripts/customize/fred/scripts/games/zap_fallout_task.sh b/scripts/customize/fred/scripts/games/zap_fallout_task.sh
new file mode 100644 (file)
index 0000000..21e1ddf
--- /dev/null
@@ -0,0 +1,12 @@
+#!/bin/bash
+
+# windows compatible process killer for any stray processes started as
+#"fallout" something.
+
+source $FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh
+
+procid="$( psa fallout | tail -n 1 | awk '{ print $1; }' )"
+
+if [ ! -z "$procid" ]; then
+  taskkill.exe /f /pid ${procid}
+fi
index a61c3625bd010bf704194d20efd59984b9bc152f..3b67d6e38afa9c3a6b40100d76ba20d4bc2ed0e4 100644 (file)
@@ -14,6 +14,10 @@ if [ -z "$feisty_path" ]; then
 fi
 
 export RUN_ALL_TESTS=true
+# clean up any old home storage paths.
+\rm -rf "$feisty_path/home_store".*
+# set home folder to a new home_store.random folder, for anything that
+# feisty meow needs to store under $HOME.
 export HOME="$(mktemp -d "$feisty_path/home_store.XXXXXX")"
 cd "$feisty_path"
 export FEISTY_MEOW_APEX="$(\pwd)"
index 431c85a61a2b012225c3839ae18a2d412092ffcf..130e9cddd56dcd34400044721a835535040c957c 100644 (file)
@@ -41,7 +41,8 @@ local boguslog=$HOME/screen_junk_$(date_stringer).log
 #maybe they unbroke it in 17.10?  yes, but it requires NO space now.  *&@#*&@#
 #hmmm: bring back old version but check for ubuntu 17.04 vs 17.10 now.
 #actually they made it a new parm.  arghhh!
-  screen -L $boguslog -S "$screen_name" -d -m nice -n $NICENESS_LEVEL mono "$app_name" 
+  screen -L -S "$screen_name" -d -m nice -n $NICENESS_LEVEL mono "$app_name" 
+#$boguslog 
 
   echo "$(date_stringer ' '): $screen_name started."
   # only sleep if we are not at the last process that gets started.
diff --git a/scripts/rev_control/git_scruncher.sh b/scripts/rev_control/git_scruncher.sh
new file mode 100644 (file)
index 0000000..76ca12d
--- /dev/null
@@ -0,0 +1,15 @@
+#!/bin/bash
+
+# check for whether we see a .git folder.
+if [ ! -d ".git" ]; then
+  echo This script needs to run in the directory where a git repository lives,
+  echo but we do not see a .git directory here.
+  exit 1
+fi
+
+# makes git checkouts not be as intensive on the server.
+git config --global pack.windowMemory "100m"
+git config --global pack.SizeLimit "100m" 
+git config --global pack.threads "1"
+
+
index d74fe1bd67c43c713249809e0bcbf0a991cb4b0a..b96bcb3431fe55aa4f7bb478bc85e3300a08cd6b 100644 (file)
@@ -11,6 +11,23 @@ source "$FEISTY_MEOW_SCRIPTS/tty/terminal_titler.sh"
 
 ##############
 
+# check git version to see if we can use autostash.
+# this appears to be an ubuntu issue, where xenial did not provide it even though the
+# feature appeared in git 2.6 and xenial claims it has git version 2.7.4.  eventually,
+# this version test can go away.
+gitvertest="$(git version | sed -e 's/git version [0-9]\.//' | sed -e 's/\.[0-9][0-9]*$//' )"
+if (( $gitvertest >= 11 )); then
+  # auto-stash is not available until 2.6 for git, but ubuntu is misreporting or using a
+  # differing version number somehow.  we are sure autostash was missing on ubuntu xenial
+  # with git 2.7.4 and it's definitely present in zesty with git at 2.11.
+#  PULL_ADDITION='--rebase --autostash'
+#although initially attractive, above set of flags seems to lose history we don't want to
+#lose.
+PULL_ADDITION=
+fi
+
+##############
+
 # the maximum depth that the recursive functions will try to go below the starting directory.
 export MAX_DEPTH=5
 
@@ -379,6 +396,8 @@ function do_careful_git_update()
   show_branch_conditionally "$this_branch"
 
   # this code is now doing what i have to do when i repair the repo.  and it seems to be good so far.
+  # note that we allow the local branch to be merged with its remote counterpart; otherwise we would
+  # miss changes that happened elsewhere which should be seen in our local copy.
   local branch_list=$(all_branch_names)
   local bran
   for bran in $branch_list; do
@@ -392,7 +411,9 @@ function do_careful_git_update()
     remote_branch_info=$(git ls-remote --heads origin $bran 2>/dev/null)
     if [ ! -z "$remote_branch_info" ]; then
       # we are pretty sure the remote branch does exist.
-      git pull --no-ff origin "$bran" | $TO_SPLITTER
+      git pull --tags $PULL_ADDITION origin "$bran" | $TO_SPLITTER
+# we may want to choose to do fast forward, to avoid crazy multiple merge histories
+# without any changes in them.  --no-ff
       promote_pipe_return 0
     fi
     test_or_die "git pull of remote branch: $bran"
@@ -404,7 +425,10 @@ function do_careful_git_update()
 
   # now pull down any changes in our own origin in the repo, to stay in synch
   # with any changes from others.
-  git pull --no-ff --all | $TO_SPLITTER
+  git pull --tags $PULL_ADDITION --all | $TO_SPLITTER
+#is the above really important when we did this branch already in the loop?
+#it does an --all, but is that effective or different?  should we be doing that in above loop?
+# --no-ff   
   promote_pipe_return 0
   test_or_die "git pulling all upstream"
 
@@ -443,9 +467,10 @@ function do_update()
   elif [ -d ".git" ]; then
     if test_writeable ".git"; then
       $blatt
-      git pull --no-ff 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER
+      git pull --tags $PULL_ADDITION 2>&1 | grep -v "X11 forwarding request failed" | $TO_SPLITTER
+#ordinary pulls should be allowed to do fast forward: --no-ff 
       promote_pipe_return 0
-      test_or_die "git pull of origin without fast forwards"
+      test_or_die "git pull of origin"
     fi
   else
     # this is not an error necessarily; we'll just pretend they planned this.
diff --git a/scripts/security/password_functions.sh b/scripts/security/password_functions.sh
new file mode 100644 (file)
index 0000000..f1e0df1
--- /dev/null
@@ -0,0 +1,78 @@
+#!/bin/bash
+
+# a set of useful functions for managing operations with passwords.
+# a set of very simple operations, but the file needs to be protected from
+# undesirable access.  a good way to do that is to make the file owned by
+# root, and for it to have permssions of "600" (full access by owner only),
+# and to only try to read the password file when in sudo mode.  the first
+# two requirements are done automatically by the store_password function.
+
+# load_password:
+# provides a way to read a password out of a file.  the filename is the first
+# paramater and the variable to fill with the password is the second.
+function load_password()
+{
+  local passfile="$1"; shift
+  local varname="$1"; shift
+  if [ -z "$passfile" ]; then
+    echo 'The load_password function needs a filename to read the password from.'
+    return 1
+  fi
+  if [ ! -f "$passfile" ]; then
+    # no file, which is not an error necessarily, but return a blank password
+    # in any case.
+    return 0
+  fi
+  local passwd
+  read passwd < "$passfile"
+
+  # return the password in the variable they provided.
+  eval $varname="$passwd"
+}
+
+# stores a password into a password file.  the password file should be the
+# first parameter and the password should be the second.
+# this makes sure that only root can read the file.
+function store_password()
+{
+  local passfile="$1"; shift
+  local passwd="$1"; shift
+  if [ -z "$passfile" -o -z "$passwd" ]; then
+    echo '
+The store_password function needs (1) the file to store the password into,
+and (2) the password that should be stored.
+'
+    return 1
+  fi
+
+  echo "$passwd" > "$passfile"
+  test_or_die "writing password into the file $passfile"
+
+  chown root:root "$passfile"
+  test_or_die "chowning the password file to root ownership for: $passfile"
+
+  chmod 600 "$passfile"
+  test_or_die "restricting permissions on password file for: $passfile"
+}
+
+# reads a password from the console, without echoing the letters when they
+# are typed.  the prompt to show the user is required as the first parameter,
+# and the variable to fill with the result is the second parameter.
+function read_password()
+{
+  local prompt="$1"; shift
+  local varname="$1"; shift
+#hmmm: complain if not enough parms.
+  echo -n "$prompt "
+  # turn off echo but remember former setting.
+  stty_orig=`stty -g`
+  stty -echo
+  local the_passwd
+  read the_passwd
+  # turn echo back on.
+  stty $stty_orig
+  # return the password in the variable they provided.
+  eval $varname="$the_passwd"
+}
+
+
index 2ae511cbb8eb50148b9efd2841ee0bddf088463e..33c3daafe142c01b70412268dd0ef332e8392e4a 100644 (file)
@@ -18,7 +18,7 @@ source "$WORKDIR/shared_site_mgr.sh"
 
 sep
 
-check_application_dir "$BASE_APPLICATION_PATH"
+check_apps_root "$BASE_APPLICATION_PATH"
 
 # find proper webroot where the site will be initialized.
 if [ -z "$app_dirname" ]; then
@@ -27,6 +27,7 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "finding and testing app folder"
 
 # where we expect to find our checkout folder underneath.
 full_app_dir="$BASE_APPLICATION_PATH/$app_dirname"
diff --git a/scripts/site_avenger/config/ecocor6.app b/scripts/site_avenger/config/ecocor6.app
new file mode 100644 (file)
index 0000000..d1d3edc
--- /dev/null
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# override for ecocor6 to set the theme.
+
+export THEME_NAME="Ecocor"
+echo "*** overrode THEME_NAME as: $THEME_NAME"
+
index ff2a99441a825320fc6742edd78d57bf6421439e..eccb0b6aefd33f6ace6af024be3390c88fcc1843 100644 (file)
@@ -3,8 +3,8 @@
 # Author: Kevin Wentworth
 # Author: Chris Koeritz
 
-# This script "powers up" a cakephp site by running the database migrations,
-# cleaning out the ORM cache, and fixing file permissions.
+# This script "powers up" a cakephp site by checking out the code from the
+# git repository and installing the composer dependencies.
 # This script is currently highly specific to site avenger.
 
 # General Info:
@@ -13,7 +13,7 @@
 # A git repository is expected to be provided, and we will get all the code
 # for the web site from there.  The repository is expected to have a single
 # application "name" and one or more "themes".  By convention, the name
-# and the theme are often the same.
+# and the theme are often the same, except the theme is capitalized.
 # For example, let's say our app name is "turtle" and our theme name is "box".
 # The repo is checked out to a folder called "~/apps/turtle".
 # This script will want to use "turtle" as the app name.
@@ -59,7 +59,7 @@ source "$WORKDIR/shared_site_mgr.sh"
 
 sep
 
-check_application_dir "$BASE_APPLICATION_PATH"
+check_apps_root "$BASE_APPLICATION_PATH"
 
 # find proper webroot where the site will be initialized.
 if [ -z "$app_dirname" ]; then
@@ -68,16 +68,23 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "finding and testing app folder"
 
 # where we expect to find our checkout folder underneath.
 full_app_dir="$BASE_APPLICATION_PATH/$app_dirname"
 
 # use our default values for the repository and theme if they're not provided.
 if [ -z "$repo_name" ]; then
-  repo_name="$app_dirname"
+  repo_name="$REPO_NAME"
+  if [ -z "$repo_name" ]; then
+    repo_name="$app_dirname"
+  fi
 fi
 if [ -z "$theme_name" ]; then
-  theme_name="$(capitalize_first_char ${app_dirname})"
+  theme_name="$THEME_NAME"
+  if [ -z "$theme_name" ]; then
+    theme_name="$(capitalize_first_char ${app_dirname})"
+  fi
 fi
 
 echo "Repository: $repo_name"
@@ -103,20 +110,5 @@ create_site_links "$site_store_path" "$theme_name"
 
 sep
 
-# go with the default user running the script.
-user_name=$USER
-if [ ! -z "$user_name" -a "$user_name" != "root" ]; then
-  echo "Chowning the apps folder to be owned by: $user_name"
-#hmmm: have to hope for now for standard group named after user 
-  chown -R "$user_name:$user_name" "$BASE_APPLICATION_PATH"
-  test_or_die "Chowning $BASE_APPLICATION_PATH to be owned by $user_name"
-
-else
-echo "user name failed checks for chowning, was '$user_name'"
-fi
-
-sep
-
-
 echo "Finished powering up the site in '${app_dirname}'."
 
index 2717b3a65d7a45abb1ee19fe16a436659e2884f4..b71d8835fc59d35daa3de0b53a646573cd673ffe 100644 (file)
@@ -9,6 +9,11 @@ if [[ $EUID != 0 ]]; then
   exit 1
 fi
 
+if [[ ! $(hostname) == *cakelampvm* ]]; then
+  echo "This script is only designed to be run on the cakelampvm host."
+  exit 1
+fi
+
 ##############
 
 export WORKDIR="$( \cd "$(\dirname "$0")" && \pwd )"  # obtain the script's working directory.
@@ -16,21 +21,22 @@ export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )"
 
 export NO_HELLO=right
 source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
+# load dependencies for our script.
 source "$FEISTY_MEOW_SCRIPTS/system/common_sysadmin.sh"
+source "$FEISTY_MEOW_SCRIPTS/security/password_functions.sh"
 
 ##############
 
-# new requirement is to get the sql root password, since we need to do some sql db configuration.
-echo -n "Please enter the MySQL root account password: "
-# turn off echo but remember former setting.
-stty_orig=`stty -g`
-stty -echo
-read mysql_passwd
-# turn echo back on.
-stty $stty_orig
+# it's a requirement to have sql root password, since we may need some sql db configuration.
+load_password /etc/mysql/secret_password mysql_passwd
+if [ -z "$mysql_passwd" ]; then
+  read_password "Please enter the MySQL root account password:" mysql_passwd
+fi
 if [ -z "$mysql_passwd" ]; then
   echo "This script must have the sql root password to proceed."
   exit 1
+else
+  store_password /etc/mysql/secret_password "$mysql_passwd"
 fi
 
 ##############
@@ -39,8 +45,8 @@ sep
 
 echo "Regenerating feisty meow loading dock."
 
-reconfigure_feisty_meow
-test_or_die "feisty meow reconfiguration"
+regenerate
+test_or_die "regenerating feisty meow configuration"
 chown -R "$(logname)":"$(logname)" /home/$(logname)/.[a-zA-Z0-9]*
 test_or_die "fix after reconfigured as sudo"
 
@@ -88,6 +94,10 @@ chown -R developer:developer /etc/apache2 /etc/bind
 test_or_die "chown apache2 and bind to developer"
 group_perm /etc/apache2 /etc/bind 
 test_or_die "group perms on apache2 and bind"
+chown -R developer:developer /opt/feistymeow.org 
+test_or_die "chown feisty meow to developer"
+group_perm /opt/feistymeow.org 
+test_or_die "group perms on feisty meow"
 
 ##############
 
@@ -98,10 +108,6 @@ group_perm $HOME/apps
 test_or_die "group perms on fred's apps"
 harsh_perm /home/fred/.ssh
 test_or_die "harsh_perm setting on fred .ssh"
-chown -R fred:fred /opt/feistymeow.org 
-test_or_die "chown feisty meow to fred"
-group_perm /opt/feistymeow.org 
-test_or_die "group perms on feisty meow"
 group_perm /home/fred/apps/mapsdemo
 test_or_die "group perms on mapsdemo app"
 
@@ -130,14 +136,14 @@ fi
 
 # install a better editor app.
 
-sep
+#sep
 
-echo "The script is about to install the bluefish editor and some dependencies.
-If the app is not already installed, then this process takes about one minute
-on a slow home DSL internet connection..."
+#echo "The script is about to install the bluefish editor and some dependencies.
+#If the app is not already installed, then this process takes about one minute
+#on a slow home DSL internet connection..."
 
-apt-get install -y bluefish &> "/tmp/install_bluefish-$(logname).log"
-test_or_continue "installing bluefish editor"
+#apt-get install -y bluefish &> "/tmp/install_bluefish-$(logname).log"
+#test_or_continue "installing bluefish editor"
 
 ##############
 
@@ -234,7 +240,7 @@ fi
 
 ##############
 
-# fix samba configuration for (ass-headed) default of read-only in user homes.
+# fix samba configuration for screwy default of read-only in user homes.
 # why cripple a necessary feature by default?
 
 sep
@@ -242,13 +248,25 @@ sep
 pattern="[#;][[:blank:]]*read only = yes"
 replacement="read only = no"
 
-# we just always do the replacement now, after realizing the sentinel pattern
-# was acutally already in the file...  too much subtlety can get one into trouble.
+# we just always do the replacement now rather than making it conditional,
+# after realizing the sentinel pattern was actually already in the file...
+# too much subtlety can get one into trouble.
 sed -i "0,/$pattern/{s/$pattern/$replacement/}" /etc/samba/smb.conf
 test_or_die "patching samba configuration to enable write acccess on user home dirs"
+echo successfully patched the samba configuration to enable writes on user home directories. 
+
+# add in a disabling of the archive bit mapping feature, which hoses up the execute bit
+# in an attempt to save the sad old DOS archive bit across the samba connection.
+grep -q "map archive" /etc/samba/smb.conf
+# if the phrase wasn't found, we need to add it.
+if [ $? -ne 0 ]; then
+  sed -i "s/\[global\]/\[global\]\n\nmap archive = no/" /etc/samba/smb.conf
+  test_or_die "patching samba configuration to turn off archive bit mapping feature"
+  echo Successfully fixed Samba to not use the archive bit mapping feature.
+fi
+
 # sweet, looks like that worked...
 restart_samba
-echo successfully patched the samba configuration to enable writes on user home directories. 
 
 ##############
 
@@ -270,6 +288,92 @@ test_or_die "enabling the new cakelampvm environment config for apache"
 
 echo Successfully configured the apache2 environment variables needed for cakelampvm.
 
+##############
+
+# add in a swap mount if not already configured.
+
+sep
+
+# we will only add swap now if explicitly asked for it.  this is to avoid creating
+# a swap file where the vm is running on an SSD, since that can use up the SSD's lifespan
+# too quickly.
+if [ ! -z "$ADD_SWAP" ]; then
+  echo "Checking existing swap partition configuration.
+"
+
+  # check for existing swap.
+  free | grep -q "Swap:[[:blank:]]*[1-9][0-9]"
+  if [ $? -ne 0 ]; then
+    # no swap in current session, so add it.
+    echo "Enabling ramdisk swap partition...
+"
+    add_swap_mount
+    echo "
+Enabled ramdisk swap partition for current boot session."
+  fi
+
+  # the above just gives this session a swap partition, but we want to have
+  # the vm boot with one also.
+
+  # check if there is already swap mentioned in the root crontab.  we will get root's
+  # crontab below since this script has to run as sudo.
+  crontab -l | grep -iq add_swap_mount
+  if [ $? -ne 0 ]; then
+    # no existing swap setup in crontab, so add it.
+    echo "
+Adding a boot-time ramdisk swap partition...
+"
+    # need to do it carefully, since sed won't add lines to a null file.  we thus
+    # create a temporary file to do our work in and ignore sed as a tool for this.
+    tmpfile="$(mktemp junk.XXXXXX)"
+    crontab -l 2>/dev/null >"$tmpfile"
+    echo "
+# need to explicitly set any variables we will use.
+FEISTY_MEOW_APEX=${FEISTY_MEOW_APEX}
+# add swap space to increase memory available.
+@reboot bash $FEISTY_MEOW_APEX/scripts/system/add_swap_mount.sh
+" >>"$tmpfile"
+    # now install our new version of the crontab.
+    crontab "$tmpfile"
+    rm "$tmpfile"
+
+    echo "
+Added boot-time ramdisk swap partition to crontab for root."
+  fi
+fi
+
+##############
+
+sep
+
+echo Adding site avenger packages to composer.
+# add in site avenger dependencies so we can build avcore properly.
+pushd ~ &>/dev/null
+sudo -u $(logname) composer config -g repositories.siteavenger composer https://packages.siteavenger.com/
+popd &>/dev/null
+
+##############
+
+# make the apache umask set group permissions automatically, so we stop having weird
+# permission issues on temp dirs.
+
+sep
+
+grep -q "umask" /etc/apache2/envvars
+if [ $? -eq 0 ]; then
+  # already present.
+  echo the umask configuration for apache already appears to be set.
+else
+  echo "
+
+# set umask to enable group read/write on files and directories.
+umask 002
+
+" >> /etc/apache2/envvars
+  restart_apache
+  echo "successfully changed apache umask configuration to enable group read/write"
+fi
+
 ##############
 ##############
 
@@ -285,6 +389,9 @@ echo "
 
 
 Thanks for revamping your cakelampvm.  :-)
+
+You may want to update your current shell's feisty meow environment by typing:
+  regenerate
 "
 
 ##############
index 3f73b3a8f033a615bbad7c7d85ec436192b7f97f..f824776573539e0cc446aa4d506bb355aae8283b 100644 (file)
@@ -28,7 +28,7 @@ test_or_die "loading site management configuration from: $SITE_MANAGEMENT_CONFIG
 export NO_CHECKIN_VENDOR=true
 
 # tests that the main storage folder for apps exists.
-function check_application_dir()
+function check_apps_root()
 {
   local appdir="$1"; shift
   if [ ! -d "$appdir" ]; then
@@ -63,6 +63,7 @@ the standard pattern for cakephp projects."
   source "$SITE_MANAGEMENT_CONFIG_FILE"
   test_or_die "loading site management configuration from: $SITE_MANAGEMENT_CONFIG_FILE"
 
+  return 0
 }
 
 # this function will seek out top-level directories in the target directory passed in.
@@ -100,14 +101,14 @@ function find_app_folder()
     options=( $(find "$appsdir" -mindepth 1 -maxdepth 1 -type d -exec basename {} ';') "Quit")
     select app_dirname in "${options[@]}"; do
       case $app_dirname in
-        "Quit") echo ; echo "Quitting from the script."; exit 1; ;;
+        "Quit") echo ; echo "Quitting from the script."; return 1; ;;
         *) echo ; echo "You picked folder '$app_dirname'" ; break; ;;
       esac
     done
     if [ -z "$app_dirname" ]; then
       echo "The folder was not provided.  This script needs a directory name"
       echo "within which to initialize the site."
-      exit 1
+      return 1
     fi
     PS3="$holdps3"
   fi
@@ -115,9 +116,11 @@ function find_app_folder()
   test_or_die "Testing application folder: $app_dirname"
 
   echo "Application folder is: $app_dirname"
+  return 0
 }
 
-# ensures that the app directory name is valid.
+# ensures that the app directory name is valid and then loads the config
+# for the app (either via a specific file or using the defaults).
 function test_app_folder()
 {
   local appsdir="$1"; shift
@@ -137,20 +140,22 @@ function test_app_folder()
 # eases some permissions to enable apache to write log files and do other shopkeeping.
 function fix_site_perms()
 {
-  local site_dir="$1"; shift
+  local app_dir="$1"; shift
+
+  local site_dir="$app_dir/$CHECKOUT_DIR_NAME"
 
   if [ -f "$site_dir/bin/cake" ]; then
-    chmod -R a+rx "$site_dir/bin/cake"
+    sudo chmod -R a+rx "$site_dir/bin/cake"
     test_or_die "Enabling execute bit on cake binary"
   fi
 
   if [ -d "$site_dir/logs" ]; then
-    chmod -R g+w "$site_dir/logs"
+    sudo chmod -R g+w "$site_dir/logs"
     test_or_die "Enabling group write on site's Logs directory"
   fi
 
   if [ -d "$site_dir/tmp" ]; then
-    chmod -R g+w "$site_dir/tmp"
+    sudo chmod -R g+w "$site_dir/tmp"
     test_or_die "Enabling group write on site's tmp directory"
   fi
 }
@@ -226,8 +231,10 @@ var full_app_dir checkout_dirname repo_root repo_name
     test_or_die "Git clone of repository: $repo_name"
   fi
 
-  fix_site_perms "$complete_path"
+#not doing this here since powerup uses this and has no sudo.
+  #fix_site_perms "$complete_path"
 
+#unused?
   # construct the full path to where the app will actually live.
   site_store_path="$complete_path"
 
@@ -351,4 +358,57 @@ function update_composer_repository()
   fi
 }
 
+# fixes the ownership for a site avenger or php application.
+# this almost certainly will require sudo capability, if there are any ownership problems
+# that need to be resolved.
+function fix_appdir_ownership()
+{
+  local appsdir="$1"; shift
+  local dir="$1"; shift
+
+  local combo="$appsdir/$dir"
+
+  # go with the default user running the script.
+  user_name="$USER"
+  if [ ! -z "$user_name" -a "$user_name" != "root" ]; then
+    echo "Chowning the app folder to be owned by: $user_name"
+#hmmm: have to hope for now for standard group named after user 
+    sudo chown -R "$user_name:$user_name" "$combo"
+    test_or_die "Chowning $combo to be owned by $user_name"
+  else
+    echo "user name failed checks for chowning, was found as '$user_name'"
+  fi
+
+  # 
+#probably not enough for path!
+  fix_site_perms "$combo"
+}
+
+# Jumps to an application directory given the app name.  If no app name is
+# given, it will show a menu to pick the app.
+function switch_to()
+{
+  # check for parameters.
+  app_dirname="$1"; shift
+
+  check_apps_root "$BASE_APPLICATION_PATH"
+
+  # find proper webroot where the site will be initialized.
+  if [ -z "$app_dirname" ]; then
+    # no dir was passed, so guess it.
+    find_app_folder "$BASE_APPLICATION_PATH"
+  else
+    test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
+  fi
+  if [ $? -ne 0 ]; then
+    echo "Could not locate that application directory"
+    return 1
+  fi
+
+  # where we expect to find our checkout folder underneath.
+  full_app_dir="$BASE_APPLICATION_PATH/$app_dirname"
+
+  cd $full_app_dir/$CHECKOUT_DIR_NAME
+  pwd
+}
 
index 1336a891917b6871f3bb6f3150311203dcf597af..52e2e13d6b701455695ec0f970f356ecc0ea59e2 100644 (file)
@@ -19,7 +19,7 @@ source "$WORKDIR/shared_site_mgr.sh"
 
 sep
 
-check_application_dir "$BASE_APPLICATION_PATH"
+check_apps_root "$BASE_APPLICATION_PATH"
 
 # find proper webroot where the site will be initialized.
 if [ -z "$app_dirname" ]; then
@@ -28,6 +28,7 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "finding and testing app folder"
 
 # where we expect to find our checkout folder underneath.
 full_app_dir="$BASE_APPLICATION_PATH/$app_dirname"
index 282d0cdc060f93a7d25746a89f32f43b12c078c6..e2a70593334ebffa4a30416fa5f377eedab1e567 100644 (file)
@@ -19,7 +19,7 @@ source "$WORKDIR/shared_site_mgr.sh"
 
 sep
 
-check_application_dir "$BASE_APPLICATION_PATH"
+check_apps_root "$BASE_APPLICATION_PATH"
 
 # find proper webroot where the site will be initialized.
 if [ -z "$app_dirname" ]; then
@@ -28,6 +28,7 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "finding and testing app folder"
 
 # where we expect to find our checkout folder underneath.
 full_app_dir="$BASE_APPLICATION_PATH/$app_dirname"
index 5adfcc63375aa07001e8e5b2818fc526a52c56bc..3ba100f36a7471bf39cc9bec7f7da9550c489387 100644 (file)
@@ -55,7 +55,7 @@ source "$WORKDIR/shared_site_mgr.sh"
 
 sep
 
-check_application_dir "$BASE_APPLICATION_PATH"
+check_apps_root "$BASE_APPLICATION_PATH"
 
 # find proper webroot where the site will be initialized.
 if [ -z "$app_dirname" ]; then
@@ -64,6 +64,7 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "finding and testing app folder"
 
 #echo "!! domain being added is: $DOMAIN_NAME"
 
@@ -85,12 +86,15 @@ fi
 
 sep
 
+# run this prior to the checkout to fix perms.
+fix_appdir_ownership "$BASE_APPLICATION_PATH" "$APPLICATION_NAME" 
+
+sep
+
 #echo about to do powerup with: app="$APPLICATION_NAME" repo="$REPO_NAME" theme="$THEME_NAME"
 #echo default repo is "$DEFAULT_REPOSITORY_ROOT" 
 
 powerup "$APPLICATION_NAME" "$REPO_NAME" "$THEME_NAME"
-# pass the real user name who should own the files.
-# "$(logname)"
 
 sep
 
index 5bfcbd4699b9a01696af8f4a85ebd8e6b9bb2252..91de942005a0ffaec25ae9e863ece47a97924d7d 100644 (file)
@@ -47,7 +47,7 @@ source "$WORKDIR/shared_site_mgr.sh"
 
 sep
 
-check_application_dir "$BASE_APPLICATION_PATH"
+check_apps_root "$BASE_APPLICATION_PATH"
 
 # find proper webroot where the site will be initialized.
 if [ -z "$app_dirname" ]; then
@@ -56,6 +56,7 @@ if [ -z "$app_dirname" ]; then
 else
   test_app_folder "$BASE_APPLICATION_PATH" "$app_dirname"
 fi
+test_or_die "finding and testing app folder"
 
 sep
 
index 2577f44ae4f653164dbd109d4e3449d6b75c417f..608ffc5c3306cef0a4f241f934a784e4f948a7c2 100644 (file)
@@ -2,22 +2,52 @@
 
 # auto-find the scripts, since we might want to run this as sudo.
 export WORKDIR="$( \cd "$(\dirname "$0")" && /bin/pwd )"  # obtain the script's working directory.
-source "$WORKDIR/../core/launch_feisty_meow.sh"
-
-#hmmm: should be able to add a new swap drive if desired.
-
-#hmmm: why all the hard-coded paths below?
-
-/bin/dd if=/dev/zero of=/var/swap.1 bs=1M count=2048
+export FEISTY_MEOW_APEX="$( \cd "$WORKDIR/../.." && \pwd )"
+source "$FEISTY_MEOW_APEX/scripts/core/launch_feisty_meow.sh"
+
+if [[ $EUID != 0 ]]; then
+  echo "This script must be run as root or sudo."
+  exit 1
+fi
+
+# optional parameters: the instance number of the swap file (best as a number),
+# and the size of the swap file to add.
+SWAP_INSTANCE="$1"; shift
+SWAP_SIZE="$1"; shift
+
+if [ "$SWAP_INSTANCE" == "--help" ]; then
+  echo "\
+$(basename $0):
+This script will add a swap partition for Linux that uses hard drive space for
+swap memory.  This increases the amount of available memory on RAM constrained
+systems.  It accepts two parameters: (1) the instance of the swap file, which
+should be a small number not already used for a swap partition, and (2) the
+size of the swap file in megabytes."
+  exit 0
+fi
+
+# if the swap instance variable is already set, then we'll use it.
+# this allows multiple different swap partitions to be added.
+if [ -z "$SWAP_INSTANCE" ]; then
+  SWAP_INSTANCE=1
+fi
+
+# allow the amount of swap space to be determined from outside the script.
+# this is measured in megabytes.
+if [ -z "$SWAP_SIZE" ]; then
+  SWAP_SIZE=2048
+fi
+
+/bin/dd if=/dev/zero of=/var/swap.${SWAP_INSTANCE} bs=1M count=${SWAP_SIZE}
 test_or_die "creating swap file"
 
-/bin/chmod 600 /var/swap.1
+/bin/chmod 600 /var/swap.${SWAP_INSTANCE}
 test_or_die "setting swap file permissions"
 
-/sbin/mkswap /var/swap.1
+/sbin/mkswap /var/swap.${SWAP_INSTANCE}
 test_or_die "formatting swap file as swap partition"
 
-/sbin/swapon /var/swap.1
+/sbin/swapon /var/swap.${SWAP_INSTANCE}
 test_or_die "enabling new swap partition"
 
 free
index b15d0efef2cb9905869811af115eb70faed09acb..7790fe884fe87a03602939d89a10c29aebf0306b 100644 (file)
@@ -3,8 +3,13 @@ source "$FEISTY_MEOW_SCRIPTS/core/launch_feisty_meow.sh"
 
 sudo apt-get update -y
 test_or_die "problem while doing 'apt-get update'"
-# new magic to tell dpkg to go with existing config files.  let's see if it works!
-sudo apt-get dist-upgrade -y -o Dpkg::Options::="--force-confold"
+
+# newest magic to tell dpkg to go with existing config files and force non-interactive version.
+sudo bash -c "\
+  export DEBIAN_FRONTEND=noninteractive; \
+  apt-get dist-upgrade -y -o Dpkg::Options::=\"--force-confdef\" \
+     -o Dpkg::Options::=\"--force-confold\"; \
+"
 test_or_die "problem while doing 'apt-get dist-upgrade'"
 
 
diff --git a/scripts/wine/wine_link_maker.sh b/scripts/wine/wine_link_maker.sh
new file mode 100644 (file)
index 0000000..743964e
--- /dev/null
@@ -0,0 +1,13 @@
+
+
+# find all the directories at this height.
+find . -mindepth 1 -maxdepth 1 -type d -exec echo {} ';' >$TMP/filestolink.txt 
+# make links with all lower case and all upper case versions of the names.
+while read line; do
+  ln -s "$line" "$(echo $line | tr '[:upper:]' '[:lower:]')"
+  ln -s "$line" "$(echo $line | tr '[:lower:]' '[:upper:]')"
+done < $TMP/filestolink.txt 
+# remove dead links.
+\rm $(find . -type l ! -exec test -e {} \; -print)
+
+