When I was looking at the lnmp installation script, there was a code that modified the configuration file libc6-xen.conf, which I didn't particularly understand.

WBOY
Release: 2023-03-02 07:36:02
Original
1620 people have browsed it

lnmp.org V1.3Version

There is a methodXen_Hwcap_Setting. I changed the configuration file libc6-xen.conf from hwcap 1 nosegneg to hwcap 0 nosegneg. Does this have any effect? The code is as follows:

<code>Xen_Hwcap_Setting()
{
    if [ -s /etc/ld.so.conf.d/libc6-xen.conf ]; then
        sed -i 's/hwcap 1 nosegneg/hwcap 0 nosegneg/g' /etc/ld.so.conf.d/libc6-xen.conf
    fi
}</code>
Copy after login
Copy after login

I searched online, but I don’t understand it very well. I hope you can give me the answer. Thank you

============== Additional information ===========

Maybe there is something wrong with my question. What I want to know more is, what does this configuration hwcap 1 nosegneg do? Why should we modify this configuration to hwcap 0 nosegneg?

A passage from apt-browse.

# This directive teaches ldconfig to search in nosegneg subdirectories
# and cache the DSOs there with extra bit 1 set in their hwcap match
# fields. In Xen guest kernels, the vDSO tells the dynamic linker to
# search in nosegneg subdirectories and to match this extra hwcap bit
# in the ld.so.cache file.
hwcap 1 nosegneg

Reply content:

lnmp.org V1.3Version

There is a method Xen_Hwcap_Setting. I changed the configuration file libc6-xen.conf from hwcap 1 nosegneg to hwcap 0 nosegneg. Does this have any effect? The code is as follows:

<code>Xen_Hwcap_Setting()
{
    if [ -s /etc/ld.so.conf.d/libc6-xen.conf ]; then
        sed -i 's/hwcap 1 nosegneg/hwcap 0 nosegneg/g' /etc/ld.so.conf.d/libc6-xen.conf
    fi
}</code>
Copy after login
Copy after login

I searched online, but I don’t understand it very well. I hope you can give me an answer. Thank you

============== Additional information ===========

Maybe my question is a bit problematic. What I want to know more is, what does this configuration hwcap 1 nosegneg do? Why should we modify this configuration to hwcap 0 nosegneg?

A passage from apt-browse.

# This directive teaches ldconfig to search in nosegneg subdirectories
# and cache the DSOs there with extra bit 1 set in their hwcap match
# fields. In Xen guest kernels, the vDSO tells the dynamic linker to
# search in nosegneg subdirectories and to match this extra hwcap bit
# in the ld.so.cache file.
hwcap 1 nosegneg

-s in shell file judgment means whether the file has content. If there is no content, execute the following sed
As for the first one

<code>test_name()
{

}</code>
Copy after login

It’s actually a function!

sed usage parameters

<code>
-i :直接修改读取的文件内容,而不是输出到终端

   </code>
Copy after login

Search and replace data
In addition to the entire row processing mode, sed can also search and replace partial data in row units. Basically sed's searches and substitutions are quite similar to those of vi! He kind of looks like this:

<code>
sed 's/要被取代的字串/新的字串/g'

</code>
Copy after login

So what your code means is

<code>全局把hwcap 1 nosegneg替换成hwcap 0 nosegneg</code>
Copy after login
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!