treewide: use ${stdenv.shell} instead of /bin/sh where possible
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
#!/bin/sh
|
||||
#!@shell@
|
||||
|
||||
# Executes a hook in case of a change to the
|
||||
# rfkill state. The hook can be passed as
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
{ stdenv }:
|
||||
{ stdenv, substituteAll }:
|
||||
|
||||
# Provides a facility to hook into rfkill changes.
|
||||
#
|
||||
@@ -10,7 +10,7 @@
|
||||
# Add a hook script in the managed etc directory, e.g.:
|
||||
# etc = [
|
||||
# { source = pkgs.writeScript "rtfkill.hook" ''
|
||||
# #!/bin/sh
|
||||
# #!${stdenv.shell}
|
||||
#
|
||||
# if [ "$RFKILL_STATE" -eq "1" ]; then
|
||||
# exec ${config.system.build.upstart}/sbin/initctl emit -n antenna-on
|
||||
@@ -24,7 +24,13 @@
|
||||
# Note: this package does not need the binaries
|
||||
# in the rfkill package.
|
||||
|
||||
stdenv.mkDerivation {
|
||||
let
|
||||
rfkillHook =
|
||||
substituteAll {
|
||||
inherit (stdenv) shell;
|
||||
src = ./rfkill-hook.sh;
|
||||
};
|
||||
in stdenv.mkDerivation {
|
||||
name = "rfkill-udev";
|
||||
|
||||
unpackPhase = "true";
|
||||
@@ -37,7 +43,7 @@ stdenv.mkDerivation {
|
||||
EOF
|
||||
|
||||
mkdir -p "$out/bin/";
|
||||
cp ${./rfkill-hook.sh} "$out/bin/rfkill-hook.sh"
|
||||
cp ${rfkillHook} "$out/bin/rfkill-hook.sh"
|
||||
chmod +x "$out/bin/rfkill-hook.sh";
|
||||
'';
|
||||
|
||||
@@ -46,4 +52,4 @@ stdenv.mkDerivation {
|
||||
description = "Rules+hook for udev to catch rfkill state changes";
|
||||
platforms = stdenv.lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user