Orestes leal wrote:
On Wed, 20 Jun 2007 12:53:19 -0500 Hugo Vanwoerkom <hvw59601@care2.com> wrote:Michelle Konzack wrote:Not the best way, but it works perfectly See attached Shell-Script.This is what I have: hugo@debian:~$ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda1 7692876 2444696 4857404 34% / tmpfs 518188 0 518188 0% /lib/init/rw udev 10240 160 10080 2% /dev tmpfs 518188 0 518188 0% /dev/shm /dev/hda5 5862271 2360287 3204122 43% /hda5 /dev/hda6 5862271 2658527 2905882 48% /hda6 /dev/hda7 26647936 4765152 20529144 19% /hda7 /dev/hda10 29362324 8058008 19812756 29% /hda10 /dev/hdc1 7692876 3131516 4561360 41% /hdb1 /dev/hdc2 7692908 2721760 4580368 38% /hdb2 /dev/hdc3 7691004 3704415 3595808 51% /hdb3 /dev/hdc5 7690972 3509439 3790754 49% /hdb5 /dev/hdc6 7692156 3016492 4363044 41% /hdb6 /dev/hdc7 38456308 18747544 17755264 52% /hdb7 /dev/sda2 7692908 4042996 3259132 56% /sda2 /dev/sda3 7691004 3563058 3737165 49% /sda3 /dev/sda5 7690972 4135476 3164717 57% /sda5 /dev/sda6 7690972 4887187 2413006 67% /sda6 /dev/sda7 38456308 10881196 25621612 30% /sda7 hugo@debian:~$ I run ./get_partitions.sh and it shows nothing. Is it supposed to?happen the same to me. ?
The secret is that fdisk is in /sbin and a normal user cannot see that so the script does nothing. You have to be root to use the script. Or use sudoers to make fdisk visible to normal users.
If I su myself I get: /home/hugoThu Jun 21-08:29:43SDA1# ./get_partitions.sh Found partition(s) on disk /dev/hda /dev/hda1 6054520 c W95 FAT32 (LBA) /dev/hda2 73988681 f W95 Ext'd (LBA) /dev/hda5 5957248 83 Linux /dev/hda6 5957248 83 Linux /dev/hda7 27072832 83 Linux /dev/hda8 4193248 c W95 FAT32 (LBA) /dev/hda9 976720 82 Linux swap / Solaris /dev/hda10 29831224 83 Linux Found partition(s) on disk /dev/hdc /dev/hdc1 7815591 83 Linux /dev/hdc2 7815622 83 Linux /dev/hdc3 7815622 83 Linux /dev/hdc4 54701325 5 Extended /dev/hdc5 7815591 83 Linux /dev/hdc6 7815591 83 Linux /dev/hdc7 39070048 83 Linux Found partition(s) on disk /dev/sda /dev/sda1 7815591 83 Linux /dev/sda2 7815622 83 Linux /dev/sda3 7815622 83 Linux /dev/sda4 54701325 5 Extended /dev/sda5 7815591 83 Linux /dev/sda6 7815591 83 Linux /dev/sda7 39070048 83 Linux /home/hugoThu Jun 21-08:30:34SDA1# Works nicer than cfdisk because you can see everything at once. Calls for a dialog implementation so that it "looks nice". Thanks Michelle, again, but I think he isn't watching right now. Hugo