Page 3 of 3 FirstFirst 123
Results 21 to 26 of 26

Thread: No Shell found at booting

  1. #21
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    26,955

    Default Re: No Shell found at booting

    Quote Originally Posted by nrickert View Post

    In the past, I have accidently created symlink loops, though not with bash. It's an easy mistake to make.
    Such accidents may be the result of having the parameters in the wrong sequence. The sequence might be logical when seen from the system side (point to an existing file and then specify something that should symlink to it), but less logical to the human brain (which might think: first the new file I am creating and then the one where it links to).

    I try to avoid by using the TAB file expansion of the shell. When the first few characters of the first parameter are not expanded into something meaningful, I am doing it wrong. But that implies that you know it is prone to human errors and pay already extra attention.
    Henk van Velden

  2. #22
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,307
    Blog Entries
    3

    Default Re: No Shell found at booting

    Quote Originally Posted by nrickert View Post
    I did see one problem. During booting, I got an error:
    Code:
    [FAILED] Failed to start Apply settings from /etc/sysconfig/keyboard.
    So there's probably a bashism somewhere in that startup file.
    I have reported this as bug 1175040.
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

  3. #23
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    26,955

    Default Re: No Shell found at booting

    This is a bit off-topic IMHO, but while there is a "standard " POSIX wher shells can conform to, I do not think that there is any standard that describes aq conformace of scripts.

    I mean, it is defined what a shell should do at the minimum and how it should behave on commands with a certain syntax are used, I am not sure it is forbidden (at least by POSIX) to have extensions in you shell. that go beyond what is defined in POSIX.

    It could be that openSUSE or the Linux community prescibes that only the syntax as defined in POSIX may be used in "system" scripts, but I am not aware of such a restriction.

    And of course, when you write a script for a certain shell, there should lways be a "shebang" for that shell. I used to say: when there is no shebang, it is not a script, but just a bunch of statements.
    Henk van Velden

  4. #24
    Join Date
    Aug 2010
    Location
    Chicago suburbs
    Posts
    14,307
    Blog Entries
    3

    Default Re: No Shell found at booting

    Quote Originally Posted by hcvv View Post
    And of course, when you write a script for a certain shell, there should lways be a "shebang" for that shell.
    Yes, this is the point.

    The script "/usr/sbin/kbdsettings" begins with "#! /bin/sh". But it uses bash extensions, so it should instead begin with "#! /bin/bash"
    openSUSE Leap 15.2; KDE Plasma 5.18.5;

  5. #25
    Join Date
    Jun 2008
    Location
    Netherlands
    Posts
    26,955

    Default Re: No Shell found at booting

    Quote Originally Posted by nrickert View Post
    Yes, this is the point.

    The script "/usr/sbin/kbdsettings" begins with "#! /bin/sh". But it uses bash extensions, so it should instead begin with "#! /bin/bash"
    That is correct, I understand now.

    For me sh is still the original Bourne shell. Thus for me it is confusing that sh is now in openSUSE a replacement for some "default shell", everybody's guess. And it seems to be confusing for others also, they assuming sh == bash.
    Henk van Velden

  6. #26

    Default Re: No Shell found at booting

    You shouldn't assume anything else from the standard shell than that it is POSIX-compliant of course.

    To make it less likely to make mistakes in the future, I aliased ln to ln -i -v, telling me which mink it made and asking if I try to overwrite an existing file.

Page 3 of 3 FirstFirst 123

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •