mirror of
https://github.com/libguestfs/libguestfs.git
synced 2026-03-22 07:03:38 +00:00
Don't echo output in scripts.
This commit is contained in:
24
fish/fish.c
24
fish/fish.c
@@ -277,17 +277,21 @@ rl_gets (int prompt)
|
||||
{
|
||||
#ifdef HAVE_LIBREADLINE
|
||||
|
||||
if (line_read) {
|
||||
free (line_read);
|
||||
line_read = NULL;
|
||||
if (prompt) {
|
||||
if (line_read) {
|
||||
free (line_read);
|
||||
line_read = NULL;
|
||||
}
|
||||
|
||||
line_read = readline (prompt ? FISH : "");
|
||||
|
||||
if (line_read && *line_read)
|
||||
add_history_line (line_read);
|
||||
|
||||
return line_read;
|
||||
}
|
||||
|
||||
line_read = readline (prompt ? FISH : "");
|
||||
|
||||
if (prompt && line_read && *line_read)
|
||||
add_history_line (line_read);
|
||||
|
||||
#else /* !HAVE_LIBREADLINE */
|
||||
#endif /* HAVE_LIBREADLINE */
|
||||
|
||||
static char buf[8192];
|
||||
int len;
|
||||
@@ -300,8 +304,6 @@ rl_gets (int prompt)
|
||||
if (len > 0 && buf[len-1] == '\n') buf[len-1] = '\0';
|
||||
}
|
||||
|
||||
#endif /* !HAVE_LIBREADLINE */
|
||||
|
||||
return line_read;
|
||||
}
|
||||
|
||||
|
||||
@@ -2,9 +2,6 @@ $ clone.sh /tmp/test.img /tmp/new.img /dev/sda1 192.168.1.1 newmachine
|
||||
204800+0 records in
|
||||
204800+0 records out
|
||||
104857600 bytes (105 MB) copied, 2.02821 s, 51.7 MB/s
|
||||
write-file /etc/resolv.conf "nameserver 192.168.1.1" 0
|
||||
write-file /etc/HOSTNAME "newmachine" 0
|
||||
sync
|
||||
|
||||
$ guestfish -a /tmp/new.img -m /dev/sda1
|
||||
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
$ ./rpmqa.sh RHEL53PV32.img /dev/VolGroup00/LogVol00 > /tmp/rpms
|
||||
$ ls -l /tmp/rpms
|
||||
-rw-rw-r--. 1 rjones rjones 17324 2009-04-26 06:47 /tmp/rpms
|
||||
-rw-rw-r--. 1 rjones rjones 17228 2009-04-26 07:02 /tmp/rpms
|
||||
$ head /tmp/rpms
|
||||
add "RHEL53PV32.img"
|
||||
run
|
||||
mount-ro "/dev/VolGroup00/LogVol00" /
|
||||
command "rpm -qa"
|
||||
tzdata-2008i-1.el5
|
||||
nash-5.1.19.6-44
|
||||
gnome-mime-data-2.4.2-3.1
|
||||
dump-0.4b41-2.fc6
|
||||
emacs-leim-21.4-20.el5
|
||||
rootfiles-8.1-1.1.1
|
||||
glibc-2.5-34
|
||||
popt-1.10.2.3-9.el5
|
||||
libart_lgpl-2.3.17-4
|
||||
audit-libs-1.7.7-6.el5
|
||||
|
||||
@@ -1,14 +1,8 @@
|
||||
$ show-devices.sh /dev/mapper/Guests-RHEL53PV32
|
||||
run
|
||||
list-devices
|
||||
/dev/sda
|
||||
list-partitions
|
||||
/dev/sda1
|
||||
/dev/sda2
|
||||
pvs
|
||||
/dev/sda2
|
||||
vgs
|
||||
VolGroup00
|
||||
lvs
|
||||
/dev/VolGroup00/LogVol00
|
||||
/dev/VolGroup00/LogVol01
|
||||
|
||||
@@ -1,8 +1 @@
|
||||
tar2vm.sh ../libguestfs-1.0.10.tar.gz /tmp/test.img 10M
|
||||
alloc /tmp/test.img 10M
|
||||
run
|
||||
sfdisk /dev/sda 0 0 0 ,
|
||||
mkfs ext3 /dev/sda1
|
||||
mount /dev/sda1 /
|
||||
tgz-in ../libguestfs-1.0.10.tar.gz /
|
||||
umount-all
|
||||
$ ./tar2vm.sh ../libguestfs-1.0.10.tar.gz /tmp/test.img 10M
|
||||
|
||||
Reference in New Issue
Block a user