GithubHelp home page GithubHelp logo

Comments (3)

sgielen avatar sgielen commented on July 24, 2024

I'm thinking about allowing - instead of : as well. This would be a relatively simple change in init.resizefs, even when we want backwards compatibility. Something to the extent of:

MY_MAC=$(cat /sys/class/net/eth0/address)
if [ -r "/k3os/system/config/${MY_MAC}.yaml" ]; then
        ln -s /k3os/system/config/${MY_MAC}.yaml /k3os/system/config.yaml
else
        MY_MAC=$(cat $MY_MAC | sed 's/:/-/')
        if [ -r "/k3os/system/config/${MY_MAC}.yaml" ]; then
                ln -s /k3os/system/config/${MY_MAC}.yaml /k3os/system/config.yaml
        else
                echo "Error..."
                exit 1
        fi
fi

Then, we'd update documentation to indicate that : and - are both allowed in the config filenames. Would you like to give this a try?

from picl-k3os-image-generator.

draeron avatar draeron commented on July 24, 2024

you have an error in your script, the sed command only replace the first :, this is what i've used successfully.

MY_MAC=$(cat /sys/class/net/eth0/address)
if [ -r "/k3os/system/config/${MY_MAC}.yaml" ]; then
  ln -s /k3os/system/config/${MY_MAC}.yaml /k3os/system/config.yaml
else
  MY_MAC=$(echo $MY_MAC | sed 's/:/-/g')
  if [ -r "/k3os/system/config/${MY_MAC}.yaml" ]; then
    ln -s /k3os/system/config/${MY_MAC}.yaml /k3os/system/config.yaml
  else
    echo "Error..."
    exit 1
  fi
fi

Off topic but in my fork i also changed the build script to be executable from docker compose, with a download cache as a volume should these feature are interesting to anyone. This way, you don't have to rebuild the docker image to generate your isos.

draeron@5aa3637

Otherwise this all works really great thanks for the project @sgielen

from picl-k3os-image-generator.

sgielen avatar sgielen commented on July 24, 2024

Closing all issues, because the project is archived. Thank you for being a contributor and/or user!

from picl-k3os-image-generator.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.