![]() ![]() ![]() So as of now, am using this script to disable all non-Core-required modules (slight change in the scripts above). I am not sure if such a thing already exists. ![]() It would be good if drush has a feature to not include certain packages. But this is painful to list different types. Going by the recommended way of upgrading, it would be good to disable all non-Core-required modules.ĭrush pm-list -type=module -package="Other"Ĭan be used to get a list of all package types. Links at post 13 by xjm explain getting a list of all the enabled modules.ĭrush pm-list -pipe -type=module -status=enabledĪgain this works fine for getting all enabled modules including Core-required modules. Since I work off the update status page to upgrade my module versions, I kind of wish that 'they' would print out the code names for the file directly on that page.Īnyways, hats off to the developer(s) of drush. Again, the only problem is finding the code names for the modules. I got a couple of errors where it didn't work, but it did save me lots of time and enabled most of the files for me.Īfter almost 4 years, I decided yesterday to learn drush and boy-oh-boy it is a time saver for updating modules. Not seeing a command to do that, I went to the update.php page, selected & copied my listing, removed the ' module:' with a replace command in a word processor and then replaced paragraph formatting with a space and that gave me a space separated list of most of my modules I wanted to enable. It would be nice if there was a method to extract the code names for the enabled non-core modules on the current site (maybe I missed something?). You can drush pm-enable a list of modules separated by spaces, but with about 290 non-core modules this is more difficult than just checking things off. I believe it may because drush itself has changed. I couldn't get the methods in #1 to work. My wish is that someone who knows what they are doing would help me to improve these scripts (and the instructions) to the point where they could be placed in the Documentation part of. Sed 's/disable/enable/' disablemodules >reenablemodules If for some reason you have lost or moved the earlier script you will be out of luck. It makes a copy of the shell script created by the Disable Script, changes the "drush disable" command to be "drush enable" and then pulls the same dopey trick of creating a new shell script and executing it. Sed 's/^/drush disable /' trimmedmodulelist.txt >disablemodules Sed -e 's/ block / /g' -e 's/ filter / /g' -e 's/ node / /g' -e 's/ system / /g' -e 's/ user / /g' originalmodulelist.txt >trimmedmodulelist.txt cd /var/wwwĭrush statusmodules -pipe >originalmodulelist.txt Then it prepends the "drush disable" command to the front of the list, and saves that whole thing as a new shell script, makes the script executable, and then executes it. So the script gets the list of all modules, then removes the 5 core modules (Block, Filter, Node, System, and User) from the list. It uses the Drush "statusmodules" command which returns ALL modules, including the core ones - and woe be to you if you disable the core modules. The first script disables all the non-core modules. These scripts assume that Drush 2.0 is installed and running and that your Drupal root is at /var/Disable Script Seriously, I'd love to get feedback about how to make these better, but they seem to work for me with my Drupal 6.13 system running on Ubuntu 8.10 (Ibex). These scripts are guaranteed to be buggy and slipshod, so before you play with them back everything up and check that your life-insurance policy is up to date. I'm unskilled at Drupal, at Drush, and at shell scripting, but nontheless I made a couple shell scripts that use Drush to disable or re-enable all my non-core modules. Not to mention the chances to make a mistake! If you have a lot of modules this is a real pain, especially because of dependencies many can't be enabled or disabled until others are first enabled or disabled. Drupal upgrade instructions always say to disable all non-core modules before the upgrade and then to enable them again afterwards. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |