1. 22 Oct, 2020 2 commits
    • Alessandro Rubini's avatar
      /etc/init.d/lldpd.sh: fix another bashism · 4a47cafe
      Alessandro Rubini authored
      [Thanks a lot to Enkhbold Ochirsuren of GSI who traced back a strange
      behaviour to the "printf" incompatibility].
      
      This removes "printf -v <outputvar> <format> ..." which is only
      available in bash.
      
      These needless incompatible extensions to standard commands are a
      source of endless headaches. New features must spit an error when
      unavailable (i.e., bash people should add vprintf, not break printf,
      imho)
      
      In this case, my previous "fix" to this file was incomplete, because
      I fixed a bashism but didn't see this other one.
      
      Also, this changes the shebang to call sh (which is already done by rcS:
      only the interactive execution now uses sh instead of bash).
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      4a47cafe
    • Alessandro Rubini's avatar
      apply-dot-config: fix wrong sh syntax (unexposed bug) · 049e8b55
      Alessandro Rubini authored
      In sh, string comparison for equality is "=", not "==". Bash accepts
      either operator but suggests to use "=" for posix conformance.
      Our /bin/sh is currently busybox, which accepts "==" like bash, but
      if you use ash or dash it fails:
      
         $ CONFIG_FOO=y
         $ if [ "$CONFIG_FOO" = "y" ]; then echo ok; fi
         ok
         $ if [ "$CONFIG_FOO" == "y" ]; then echo ok; fi
         dash: 3: [: y: unexpected operator
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      049e8b55
  2. 08 Oct, 2020 1 commit
  3. 07 Oct, 2020 2 commits
    • Alessandro Rubini's avatar
      patches/buildroot: turn all patches into git ones (no change) · ae852163
      Alessandro Rubini authored
      This adds the git headers, so we can easily rebuild a buildroot-for-wrs
      tree to add more patches.
      
      This is how I do it now (where "wrs-build" and "wr-switch-sw" are
      at the same directory level.
      
         cd wrs-build
      
          mkdir tmp; cd tmp
         tar xf ../downloads/buildroot-2016.02.tar.bz2
         cd buildroot-2016.02/
      
         git init; git add .; git commit -m "buildroot-2016.02 as untarred"
         git am ../../../wr-switch-sw/patches/buildroot/00*
         mv .git ../../build/buildroot-2016.02/
      
         cd ../../build/buildroot-2016.02
         <work-here>
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      ae852163
    • Alessandro Rubini's avatar
      Fix monit problem with commit 9bc9dd16 · 8a971908
      Alessandro Rubini authored
      There is a monit-related problem in commit 9bc9dd16.
      
      The commit renames /etc/init.d/lldpd.sh into /etc/init.d/lldpd.bash
      whle adding a single stanza. Try "git diff e61eb08 9ebc5e2" to
      see the difference.
      
      But monit still uses the old name. Instead of changing monit
      (a two-liner, but adds noise because of .bash), this renames back
      the file to .sh and removes the needless bashism in the new stanza.
      
      Please note that calling stuff ".bash" makes no sense (suffixes
      make no sense most of the time!). The only thing rcS does is checking
      if the name is "*.sh", to just read it in the current shell instead
      of executing. So anything not ".sh" is executed, we don't need to
      special case .bash, .py or whatever.
      Signed-off-by: Alessandro Rubini's avatarAlessandro Rubini <rubini@gnudd.com>
      8a971908
  4. 14 Sep, 2020 1 commit
  5. 28 Aug, 2020 1 commit
  6. 13 Aug, 2020 1 commit
  7. 11 Jul, 2020 2 commits
  8. 06 Jul, 2020 1 commit
  9. 12 Jun, 2020 1 commit
  10. 11 Jun, 2020 3 commits
  11. 10 Jun, 2020 5 commits
  12. 09 Jun, 2020 3 commits
  13. 08 Jun, 2020 3 commits
  14. 26 May, 2020 1 commit
  15. 25 May, 2020 2 commits
  16. 22 May, 2020 7 commits
  17. 20 May, 2020 4 commits