Changeset ba58642 for general.ent
- Timestamp:
- 10/10/2012 09:35:16 PM (12 years ago)
- Branches:
- 10.0, 10.1, 11.0, 11.1, 11.2, 11.3, 12.0, 12.1, 7.10, 7.4, 7.5, 7.6, 7.6-blfs, 7.6-systemd, 7.7, 7.8, 7.9, 8.0, 8.1, 8.2, 8.3, 8.4, 9.0, 9.1, basic, bdubbs/svn, elogind, gnome, kde5-13430, kde5-14269, kde5-14686, kea, ken/TL2024, ken/inkscape-core-mods, ken/tuningfonts, krejzi/svn, lazarus, lxqt, nosym, perl-modules, plabs/newcss, plabs/python-mods, python3.11, qt5new, rahul/power-profiles-daemon, renodr/vulkan-addition, systemd-11177, systemd-13485, trunk, upgradedb, xry111/intltool, xry111/llvm18, xry111/soup3, xry111/test-20220226, xry111/xf86-video-removal
- Children:
- ec33cf5
- Parents:
- 68a5e1d0
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
general.ent
r68a5e1d0 rba58642 117 117 <!-- End special entities about LFS compatibility --> 118 118 119 <!ENTITY as_root "<note><para>When installing multiple packages in 120 a script, the installation needs to be done as 121 the root user. There are three general options 122 that can be used to do this:</para> 123 124 <orderedlist> 125 <listitem><para>Run the entire script as the root 126 user (not recommended).</para></listitem> 127 128 <listitem><para>Use the '<command>sudo</command>' 129 command from the <xref linkend='sudo'/> 130 package.</para></listitem> 131 132 <listitem><para>Use '<command>su -c</command>' 133 which will ask for the root password for every 134 iteration of the loop.</para></listitem> 135 </orderedlist> 136 137 <para>Select a preferred method and export a 138 variable <parameter>AS_ROOT</parameter> with the 139 following command replacing 140 <parameter><as_root></parameter> with the 141 selected command (unset or use an empty variable 142 if you intend to run the entire loop as the 143 root user):</para> 144 145 <screen><userinput>export AS_ROOT='<replaceable><as_root></replaceable>'</userinput></screen> 146 </note>"> 119 <!ENTITY as_root "<note><para>When installing multiple packages in a script, 120 the installation needs to be done as the root user. There are three general 121 options that can be used to do this:</para> 122 123 <orderedlist> 124 125 <listitem><para>Run the entire script as the root user (not 126 recommended).</para></listitem> 127 128 <listitem><para>Use the <command>sudo</command> command from the <xref 129 linkend='sudo'/> package.</para></listitem> 130 131 <listitem><para>Use <command>su -c "command arguments"</command> 132 (quotes required) which will ask for the root password for every iteration 133 of the loop.</para></listitem> 134 135 </orderedlist> 136 137 <para>One way to handle this situation is to create a short 138 <command>bash</command> function that automatically selects the appropriate 139 method. Once the command is set in the environment, it does not need to be 140 set again.</para> 141 142 <screen><userinput>as_root() 143 { 144 if [ $EUID = 0 ]; then $* 145 elif [ -x /usr/bin/sudo ]; then sudo $* 146 else su -c \\"$*\\" 147 fi 148 } 149 150 export -f as_root</userinput></screen> 151 </note>"> 147 152 148 153 <!ENTITY not-katamari "<para>This package is not a part of the Xorg
Note:
See TracChangeset
for help on using the changeset viewer.