sabato 3 dicembre 2016

CENTOS 7 HP PROLIANT SMART ARRAY DRIVER

  1.     Enter BIOS (F9) and change SATA mode to b120i smart array raid controller.
  2.     Create an array from physical drives.
  3.     Check created logical volume as bootable.
  4.     Create the hpvsa driver flash-drive. Do this with DD in Linux or in Windows with Win32DiskImager. Make sure to download the latest version of the hpvsa driver.
  5. hpvsa-1.2.14-113.rhel7u2.x86_64 
  6.     Connect the flash-drive with the hpvsa driver to the server.
  7.     Boot from CentOS-DVD or make bootable usb centos 7
  8.     Wait for "Install OS..." screen and press Esc.
  9.     Type "linux modprobe.blacklist=ahci inst.dd" and hit Enter.
  10.     You will see a firmware error. Ignore it.
  11.     Select "r" to refresh the list. The hpvsa driver flash-drive should be in the list.
  12.     Install the driver.
  13.     Remove hpvsa driver flash-drive before continuing.
  14.     Allow OS installer to load. 
  15.     After selecting a langauge the array should be available for use.
If this suggestion solve your day please leave a short like or follow me. :) 

mercoledì 21 settembre 2016

Wordpress muffin betheme conditional menu

Goal: Show different menu race by logged in user state.
When user is logged it will be show a different one.

After try several plugin, (but no one is working ) and reading worst discussion on muffin forum
i decided, reluctantly, to write some php function to solve issue.

In my scenario consider i'm using betheme with child theme.
Create menu to show when user will be loggedin, in my case call it: menu-loggedout

Insert on function.php file:
       
 
function my_wp_nav_menu_args( $args = '' ) {
 // Primary menu location
 if( 'main-menu' == $args['theme_location'] ) {
  if( is_user_logged_in() ) {
   $args['menu'] = 'menu-loggedout';
  } else {
   $args['menu'] = 'Main Menu';
  }

  return $args;
 }else{
  echo $args['theme_location'];
 }
}
add_filter( 'wp_nav_menu_args', 'my_wp_nav_menu_args' );

       
 
Save and now check on front-end site ... it work like a charm!

Consider, if something was wrong, to echoing $args['theme_location'] variable as you can discover quickly how muffin developer define ad store main menu name.

If this suggestion solve your day please leave a short like or follow me. :)