. * * Version 0.1 * Author: Octavio Benedi Sanchez */ function mount_user_partition($post_data) { global $base_plugin; $deactivated=true; if(file_exists($base_plugin.'data/mountpoint_name.conf')) { $mountpoint=file($base_plugin.'data/mountpoint_name.conf'); $mountpoint_dir=trim($mountpoint[0]); unset($mountpoint); } else { $mountpoint_dir='/mnt/user'; } if(!$deactivated) { exec('sudo '.$base_plugin.'bin/activate_crypt_part.sh '.$post_data['mount_encrypted_user_partition_key'].' '.$mountpoint_dir.' 2>&1'); response_additem("script", 'alert("Partition mounted.")'); } else { response_additem("script", 'alert("Function disabled. You can enable it looking at source code. This function has been disabled because it can harm your hard disk.")'); } } ?>