WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: (solved) no such file or directory but file is there  (Read 2589 times)

Offline halma

  • Full Member
  • ***
  • Posts: 164
(solved) no such file or directory but file is there
« on: August 01, 2018, 12:46:18 PM »
Hi,

if i try to start an initscript by hand unter TC9.x (x86_64) from console "
Code: [Select]
sudo /usr/local/etc/init.d/xencommons start"
it trows out this error message:
Code: [Select]
sudo: unable to execute /usr/local/etc/init.d/xencommons: No such file or directory
but as you can see the file/s are there ...
Code: [Select]
ls -hal /usr/local/etc/init.d/
total 0
drwxr-xr-x  2 root root  0 Apr 19 19:52 ./
drwxr-xr-x 10 root root  0 Apr 19 19:58 ../
lrwxrwxrwx  1 root root 48 Aug  1 20:10 openssh -> /tmp/tcloop/openssh/usr/local/etc/init.d/openssh
lrwxrwxrwx  1 root root 56 Aug  1 20:10 xen-watchdog -> /tmp/tcloop/xen4-tools/usr/local/etc/init.d/xen-watchdog
lrwxrwxrwx  1 root root 54 Aug  1 20:10 xencommons -> /tmp/tcloop/xen4-tools/usr/local/etc/init.d/xencommons
lrwxrwxrwx  1 root root 54 Aug  1 20:10 xendomains -> /tmp/tcloop/xen4-tools/usr/local/etc/init.d/xendomains
lrwxrwxrwx  1 root root 59 Aug  1 20:10 xendriverdomain -> /tmp/tcloop/xen4-tools/usr/local/etc/init.d/xendriverdomain

Code: [Select]
mount
rootfs on / type rootfs (rw)
proc on /proc type proc (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,mode=600,ptmxmode=000)
tmpfs on /dev/shm type tmpfs (rw,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,relatime)
/dev/sda1 on /mnt/sda1 type ext3 (rw,relatime,data=ordered)
/mnt/sda1/tce/optional/attr.tcz on /tmp/tcloop/attr type squashfs (ro,relatime) ...snip

Code: [Select]
uname -a
Linux xenbox 4.14.10-tinycore64 #1 SMP Sat Jul 28 22:56:00 GMT 2018 x86_64 GNU/Linux

so my question is, what is wrong ?
Thanks Halma
« Last Edit: August 01, 2018, 12:54:01 PM by halma »
1 + 2 = 6  cause  10 - 6 = 78 ;-) lol

Offline halma

  • Full Member
  • ***
  • Posts: 164
Re: no such file or directory but file is there
« Reply #1 on: August 01, 2018, 12:53:46 PM »
ok ... it seems that the xencommons script needs shebang fix.

Code: [Select]
cat xencommons  | head -n1
#!/bin/bash
Code: [Select]
tc@xenbox:/usr/local/etc/init.d$ which bash
/usr/local/bin/bash

after creating a symlink for testing only, i can start the script now.
Code: [Select]
sudo ln -s /usr/local/bin/bash /bin/bash
1 + 2 = 6  cause  10 - 6 = 78 ;-) lol

Offline curaga

  • Administrator
  • Hero Member
  • *****
  • Posts: 10960
Re: (solved) no such file or directory but file is there
« Reply #2 on: August 02, 2018, 12:37:40 AM »
Bash's startup script should create that symlink. I see the startup script looks correct, are your extensions up to date, etc?
The only barriers that can stop you are the ones you create yourself.