Red Hat Training
A Red Hat training course is available for Red Hat Enterprise Linux
Apéndice G. Comandos alternativos para Busybox
A diferencia de los anteriores lanzamientos de Red Hat Enterprise Linux, Red Hat Enterprise Linux 6 no incluye una versión de busybox que proporcione comandos de shell en los entornos de pre y post instalación. Tabla G.1, “Comandos alternativos para Busybox” contiene la lista de comandos de busybox, formas equivalentes para implementar la misma funcionalidad en bash, y la disponibilidad de estas alternativas en los entornos de %pre y %post. La tabla también indica la ruta exacta al comando, aunque generalmente no se necesita especificar la ruta porque la variable de entorno
PATH
está configurada en el entorno de instalación.
Si el comando sólo está disponible en %post, el comando se está ejecutando en el sistema de destino y su disponibilidad depende de si el paquete que proporciona el comando está instalado. Cada comando que aparece en la columna "Nuevo comando o alternativa" de Tabla G.1, “Comandos alternativos para Busybox” está disponible para Red Hat Enterprise Linux 6, aunque no todos los comandos están disponibles en cada sistema instalado.
Cuando un comando está listado como no disponible, puede crear una funcionalidad equivalente con un script de Python. El lenguaje Python está disponible para autores de script %pre y %post, completo con un set de módulos Python listos para ser utilizados. Por lo tanto, si un determinado comando no está disponible para su entorno de instalación, recomendamos el uso de Python como lenguaje de script.
Tabla G.1. Comandos alternativos para Busybox
Comando Busybox | %pre | %post | Nuevo comando o alternativa |
---|---|---|---|
addgroup | no | sí | /usr/sbin/groupadd |
adduser | no | sí | /usr/sbin/useradd |
adjtimex | no | no | ninguno |
ar | no | sí | /usr/bin/ar |
arping | sí | sí | /sbin/arping o /usr/sbin/arping |
ash | sí | sí | /bin/bash |
awk | sí | sí | /sbin/awk , /sbin/gawk , o /usr/bin/gawk [a] |
basename | sí | sí | /bin/bash [b], /usr/bin/basename |
bbconfig | no | no | none — este comando es específico para Busybox |
bunzip2 | sí | sí | /usr/bin/bunzip2 , /usr/bin/bzip2 -d |
busybox | no | no | ninguno |
bzcat | sí | sí | /usr/bin/bzcat , /usr/bin/bzip2 -dc |
cal | no | sí | /usr/bin/cal |
cat | sí | sí | /usr/bin/cat |
catv | no | no | cat -vET o cat -A |
chattr | sí | sí | /usr/bin/chattr |
chgrp | sí | sí | /usr/bin/chgrp |
chmod | sí | sí | /usr/bin/chmod |
chown | sí | sí | /usr/bin/chown |
chroot | sí | sí | /usr/sbin/chroot |
chvt | sí | sí | /usr/bin/chvt |
cksum | no | sí | /usr/bin/cksum |
clear | sí | sí | /usr/bin/clear |
cmp | no | sí | /usr/bin/cmp |
comm | no | sí | /usr/bin/comm |
cp | sí | sí | /usr/bin/cp |
cpio | sí | sí | /usr/bin/cpio |
crond | no | no | none — no hay daemons disponibles para scriptlets |
crontab | no | sí | /usr/bin/crontab |
cut | sí | sí | /usr/bin/cut |
date | sí | sí | /usr/bin/date |
dc | no | sí | /usr/bin/dc |
dd | sí | sí | /usr/bin/dd |
deallocvt | no | sí | /usr/bin/deallocvt |
delgroup | no | sí | /usr/sbin/groupdel |
deluser | no | sí | /usr/sbin/userdel |
devfsd | no | no | none — Red Hat Enterprise Linux no usa devfs |
df | sí | sí | /usr/bin/df |
diff | no | sí | /usr/bin/diff |
dirname | sí | sí | /bin/bash [c], /usr/bin/dirname |
dmesg | sí | sí | /usr/bin/dmesg |
dnsd | no | no | none — no hay daemons disponibles para scriptlets |
dos2unix | no | no | sed 's/.$//' |
dpkg | no | no | none — no soporte para paquetes Debian |
dpkg-deb | no | no | none — no soporte para paquetes Debian |
du | sí | sí | /usr/bin/du |
dumpkmap | no | no | ninguno |
dumpleases | no | no | ninguno |
e2fsck | sí | sí | /usr/sbin/e2fsck |
e2label | sí | sí | /usr/sbin/e2label |
echo | sí | sí | /usr/bin/echo |
ed | no | no | /sbin/sed , /usr/bin/sed |
egrep | sí | sí | /sbin/egrep , /usr/bin/egrep |
eject | sí | sí | /usr/bin/eject |
env | sí | sí | /usr/bin/env |
ether-wake | no | no | ninguno |
expr | sí | sí | /usr/bin/expr |
fakeidentd | no | no | none — no hay daemons disponibles para scriptlets |
false | sí | sí | /usr/bin/false |
fbset | no | sí | /usr/sbin/fbset |
fdflush | no | no | ninguno |
fdformat | no | sí | /usr/bin/fdformat |
fdisk | sí | sí | /usr/sbin/fdisk |
fgrep | sí | sí | /sbin/fgrep , /usr/bin/fgrep |
find | sí | sí | /usr/bin/find |
findfs | no | no | ninguno |
fold | no | sí | /usr/bin/fold |
free | no | sí | /usr/bin/free |
freeramdisk | no | no | ninguno |
fsck | sí | sí | /usr/sbin/fsck |
fsck.ext2 | sí | sí | /usr/sbin/fsck.ext2 , /usr/sbin/e2fsck |
fsck.ext3 | sí | sí | /usr/sbin/fsck.ext3 , /usr/sbin/e2fsck |
fsck.minix | no | no | none — no soporte para el sistema de archivos Minix |
ftpget | sí | sí | /usr/bin/ftp o Python ftplib module |
ftpput | sí | sí | /usr/bin/ftp o Python ftplib module |
fuser | no | sí | /sbin/fuser |
getopt | no | sí | /usr/bin/getopt |
getty | no | no | ninguno |
grep | sí | sí | /sbin/grep , /usr/bin/grep |
gunzip | sí | sí | /usr/bin/gunzip , /usr/bin/gzip -d |
gzip | sí | sí | /usr/bin/gzip |
hdparm | sí | sí | /usr/sbin/hdparm |
head | sí | sí | /usr/bin/head |
hexdump | no | sí | /usr/bin/hexdump |
hostid | no | sí | /usr/bin/hostid or Python |
hostname | sí | sí | /sbin/hostname , /usr/bin/hostname |
httpd | no | no | none — no hay daemons disponibles para scriptlets |
hush | no | no | ninguno |
hwclock | sí | sí | /usr/sbin/hwclock |
id | no | sí | /usr/bin/id o Python |
ifconfig | sí | sí | /sbin/ifconfig , /usr/sbin/ifconfig |
ifdown | no | no | ifconfig dispositivo down |
ifup | no | no | ifconfig dispositivo up |
inetd | no | no | none — no hay daemons disponibles para scriptlets |
insmod | sí | sí | /sbin/insmod , /usr/sbin/insmod |
install | no | sí | /usr/bin/install o mkdir/cp/chmod/chown/chgrp |
ip | sí | sí | /sbin/ip , /usr/sbin/ip |
ipaddr | no | no | ifconfig o ip |
ipcalc | sí | sí | /sbin/ipcalc , /usr/bin/ipcalc |
ipcrm | no | sí | /usr/bin/ipcrm |
ipcs | no | sí | /usr/bin/ipcs |
iplink | no | no | ip |
iproute | no | no | ip |
iptunnel | no | sí | /sbin/iptunnel |
kill | sí | sí | /sbin/kill , /usr/bin/kill |
killall | sí | sí | /usr/bin/killall |
lash | no | no | ninguno |
last | no | sí | /usr/bin/last |
length | no | no | Python o bash |
less | sí | sí | /usr/bin/less |
linux32 | no | no | ninguno |
linux64 | no | no | ninguno |
ln | sí | sí | /sbin/ln , /usr/bin/ln |
load_policy | sí | sí | /sbin/load_policy , /usr/sbin/load_policy |
loadfont | no | no | ninguno |
loadkmap | no | no | ninguno |
login | sí | sí | /usr/bin/login |
logname | no | sí | /usr/bin/logname |
losetup | sí | sí | /usr/bin/losetup |
ls | sí | sí | /usr/bin/ls |
lsattr | sí | sí | /usr/bin/lsattr |
lsmod | sí | sí | /usr/bin/lsmod |
lzmacat | no | sí | /usr/bin/lzmadec |
makedevs | no | no | /usr/bin/mknod |
md5sum | sí | sí | /usr/bin/md5sum |
mdev | no | no | ninguno |
mesg | no | sí | /usr/bin/mesg |
mkdir | sí | sí | /sbin/mkdir , /usr/bin/mkdir |
mke2fs | sí | sí | /usr/sbin/mke2fs |
mkfifo | no | sí | /usr/bin/mkfifo |
mkfs.ext2 | sí | sí | /usr/sbin/mkfs.ext2 |
mkfs.ext3 | sí | sí | /usr/sbin/mkfs.ext3 |
mkfs.minix | no | no | none — no soporte para sistema de archivos Minix |
mknod | sí | sí | /usr/bin/mknod |
mkswap | sí | sí | /usr/sbin/mkswap |
mktemp | sí | sí | /usr/bin/mktemp |
modprobe | sí | sí | /sbin/modprobe , /usr/sbin/modprobe |
more | sí | sí | /usr/bin/more |
mount | sí | sí | /sbin/mount , /usr/bin/mount |
mountpoint | no | no | Observe la salida del comando mount |
msh | no | no | ninguno |
mt | sí | sí | /usr/bin/mt |
mv | sí | sí | /usr/bin/mv |
nameif | no | no | ninguno |
nc | no | sí | /usr/bin/nc |
netstat | no | sí | /bin/netstat |
nice | no | sí | /bin/nice |
nohup | no | sí | /usr/bin/nohup |
nslookup | sí | sí | /usr/bin/nslookup |
od | no | sí | /usr/bin/od |
openvt | sí | sí | /usr/bin/openvt |
passwd | no | sí | /usr/bin/passwd |
patch | no | sí | /usr/bin/patch |
pidof | sí | sí | /usr/sbin/pidof |
ping | sí | sí | /usr/bin/ping |
ping6 | no | sí | /bin/ping6 |
pipe_progress | no | no | ninguno |
pivot_root | no | sí | /sbin/pivot_root |
printenv | no | sí | /usr/bin/printenv |
printf | no | sí | /usr/bin/printf |
ps | sí | sí | /usr/bin/ps |
pwd | sí | sí | /usr/bin/pwd |
rdate | no | sí | /usr/bin/rdate |
readlink | sí | sí | /sbin/readlink , /usr/bin/readlink |
readprofile | no | sí | /usr/sbin/readprofile |
realpath | no | no | Python os.path.realpath() |
renice | no | sí | /usr/bin/renice |
reset | no | sí | /usr/bin/reset |
rm | sí | sí | /sbin/rm , /usr/bin/rm |
rmdir | sí | sí | /sbin/rmdir , /usr/bin/rmdir |
rmmod | sí | sí | /sbin/rmmod , /usr/bin/rmmod |
route | sí | sí | /sbin/route , /usr/sbin/route |
rpm | sí | sí | /usr/bin/rpm |
rpm2cpio | no | sí | /usr/bin/rpm2cpio |
run-parts | no | no | ninguno |
runlevel | no | no | ninguno |
rx | no | no | ninguno |
sed | sí | sí | /sbin/sed , /usr/bin/sed |
seq | no | sí | /usr/bin/seq |
setarch | no | sí | /usr/bin/setarch |
setconsole | no | no | ninguno |
setkeycodes | no | sí | /usr/bin/setkeycodes |
setlogcons | no | no | ninguno |
setsid | no | sí | /usr/bin/setsid |
sh | sí | sí | /sbin/sh , /usr/bin/sh |
sha1sum | sí | sí | /usr/bin/sha1sum |
sleep | sí | sí | /sbin/sleep , /usr/bin/sleep |
sort | sí | sí | /usr/bin/sort |
start-stop-daemon | no | no | ninguno |
stat | no | sí | /usr/bin/stat or Python os.stat() |
strings | no | sí | /usr/bin/strings |
stty | no | sí | /bin/stty |
su | no | sí | /bin/su |
sulogin | no | sí | /sbin/sulogin |
sum | no | sí | /usr/bin/sum |
swapoff | sí | sí | /usr/sbin/swapoff |
swapon | sí | sí | /usr/sbin/swapon |
switch_root | no | sí | /sbin/switch_root |
sync | sí | sí | /usr/bin/sync |
sysctl | no | sí | /sbin/sysctl |
tail | sí | sí | /usr/bin/tail |
tar | sí | sí | /usr/bin/tar |
tee | sí | sí | /usr/bin/tee |
telnet | sí | sí | /usr/bin/telnet |
telnetd | no | no | none — no hay daemons disponibles para scriptlets |
test | no | sí | /usr/bin/test o [ en bash |
tftp | no | sí | /usr/bin/tftp |
time | no | sí | /usr/bin/time o Python |
top | sí | sí | /usr/bin/top |
touch | sí | sí | /sbin/touch , /usr/bin/touch |
tr | no | sí | /usr/bin/tr o Python |
traceroute | no | sí | /bin/traceroute |
true | sí | sí | /usr/bin/true |
tty | no | sí | /usr/bin/tty |
tune2fs | sí | sí | /usr/sbin/tune2fs |
udhcpc | no | no | /sbin/dhclient |
udhcpd | no | no | none — no hay daemons disponibles para scriptlets |
umount | sí | sí | /sbin/umount , /usr/bin/umount |
uname | no | sí | /bin/uname o Python os.uname() |
uncompress | no | no | ninguno |
uniq | sí | sí | /usr/bin/uniq |
unix2dos | no | no | sed 's/$//' |
unlzma | no | sí | /usr/bin/unlzma |
unzip | no | sí | /usr/bin/unzip |
uptime | no | sí | /usr/bin/uptime o Python leyendo /proc/uptime |
usleep | no | sí | /bin/usleep o Python |
uudecode | no | sí | /usr/bin/uudecode o Python |
uuencode | no | sí | /usr/bin/uuencode o Python |
vconfig | sí | sí | /usr/sbin/vconfig |
vi | sí | sí | /usr/bin/vi |
vlock | no | no | ninguno |
watch | no | sí | /usr/bin/watch |
watchdog | no | no | ninguno |
wc | sí | sí | /usr/bin/wc |
wget | sí | sí | / , /usr , /home |
which | no | sí | /usr/bin/which |
who | no | sí | /usr/bin/who |
whoami | no | sí | /usr/bin/whoami |
xargs | sí | sí | /usr/bin/xargs |
yes | no | sí | /usr/bin/yes |
zcat | sí | sí | /usr/bin/zcat |
zcip | no | no | NetworkManager debe tener cuidado de éste |
[a]
Red Hat Enterprise Linux 6 distribuye con GNU awk en lugar de Busybox awk en el entorno de instalación.
[b]
bash GNU puede proporcionar funcionalidad de nombre de base mediante la manipulación de cadenas. Si var="/usr/bin/command" , entonces echo ${var##*/} da command .
[c]
GNU bash puede proporcionar la funcionalidad dirname mediante la manipulación de cadenas. Si var="/usr/bin/command" , entonces echo ${var%/*} entrega /usr/bin .
|