WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: tce-setdrive allows also silly choices  (Read 1998 times)

Offline maro

  • Hero Member
  • *****
  • Posts: 1228
tce-setdrive allows also silly choices
« on: May 25, 2010, 10:14:40 PM »
If one uses '/usr/bin/tce-setdrive' and selects (e.g. by accident) a CD-ROM device (e.g. '/dev/hdc') one gets the following result:
Code: [Select]
tc@box:~$ cat /opt/.tce_dir
/tmp/tce
tc@box:~$ tce-setdrive
tce-setdrive - Choose Drive for TCE directory

         1. /mnt/hda1
         2. /mnt/hdc

Enter selection ( 1 - 2 ) or (q)uit, (n)ext, (p)revious: 2
mkdir: can't create directory '/mnt/hdc/tce/': Read-only file system
chown: /mnt/hdc/tce: No such file or directory
chmod: /mnt/hdc/tce: No such file or directory
touch: /mnt/hdc/tce/mydata.tgz: No such file or directory

Your TCE Drive, /mnt/hdc/tce, is now enabled!tc@box:~$
tc@box:~$ cat /opt/.tce_dir
/mnt/hdc/tce

I guess when the 'mkdir' fails the remaining commands should probably not be attempted and at least the change of '/opt/.tce_dir' should not be done.

EDIT: I forgot to mention that this happens on TC 2.11.1 as well as TC 3.0alpha4.
« Last Edit: May 25, 2010, 10:30:11 PM by maro »

Offline roberts

  • Retired Admins
  • Hero Member
  • *****
  • Posts: 7361
  • Founder Emeritus
Re: tce-setdrive allows also silly choices
« Reply #1 on: May 26, 2010, 02:53:13 PM »
Same for PPI Setup. WIll tighten up the select list.
Thanks for reporting.
10+ Years Contributing to Linux Open Source Projects.