Giter Site home page Giter Site logo

Comments (6)

joukewitteveen avatar joukewitteveen commented on August 28, 2024

The profile and hooks are sourced at each action. When this happens, you'll find the following environment variables set: INTERFACE, SSID, ACTION. Also, the Profile variable is set.

from netctl.

graywolf avatar graywolf commented on August 28, 2024

I don't agree with you sir.

I have executable script /etc/netctl/hooks/test , which IS executed. Content of this file is:

#!/bin/bash
echo $ACTION > /tmp/test
echo $INTERFACE >> /tmp/test
echo $SSID >> /tmp/test
echo $PROFILE >> /tmp/test

It creates file /tmp/test, but this file only contains for blank lines.

Action which executes the hook is:

netctl stop wlp4s0-orchiprg

So this may be a bug? Or am I doing something wrong?

from netctl.

joukewitteveen avatar joukewitteveen commented on August 28, 2024

The variables are only set when the connection actually changes. This means that netctl-auto hands-off the connection to wpa_supplicant, which does its magic (including setting the variables mentioned) whenever the connection changes. Hence the initial starting and stopping are not part of this scheme. You could complement your setup with ExecUpPost and ExecDownPre.

from netctl.

graywolf avatar graywolf commented on August 28, 2024

So if I got it right I need to add this two hooks into EVERY profile I have? Don't take me wrong, netctl is pretty good thing, but this is just stupid.

from netctl.

joukewitteveen avatar joukewitteveen commented on August 28, 2024

You could also specify them in a hook file or an interface file, effectively making it the default for every profile or every profile for a specific interface.

from netctl.

graywolf avatar graywolf commented on August 28, 2024

Hey, that's great ^_^ thanks

from netctl.

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.