remove .service/.target/.bundle etc suffixes on service names
they don't seem to be providing value
This commit is contained in:
parent
2e13f1372e
commit
0632b5102e
5 changed files with 12 additions and 10 deletions
|
@ -203,9 +203,11 @@ tools
|
||||||
15) "ip address add" seems to magically recognise v4 vs v6 but
|
15) "ip address add" seems to magically recognise v4 vs v6 but
|
||||||
is that specified or fluke?
|
is that specified or fluke?
|
||||||
|
|
||||||
18) maybe stop suffixing all the service names with .service
|
DONE 18) maybe stop suffixing all the service names with .service
|
||||||
|
|
||||||
|
19) syslogd - use busybox or s6? the only thing (so far) using it is pppd.
|
||||||
|
Maybe we could LD_PRELOAD it to use stderr instead
|
||||||
|
|
||||||
19) syslogd - use busybox or s6?
|
|
||||||
|
|
||||||
DONE 20) The option currently called defaultPackages needs a better name as
|
DONE 20) The option currently called defaultPackages needs a better name as
|
||||||
it doesn't have the same semantics as nixos
|
it doesn't have the same semantics as nixos
|
||||||
|
|
|
@ -17,7 +17,7 @@ interface: {
|
||||||
let
|
let
|
||||||
name = "${interface.device}.pppoe";
|
name = "${interface.device}.pppoe";
|
||||||
ip-up = writeAshScript "ip-up" {} ''
|
ip-up = writeAshScript "ip-up" {} ''
|
||||||
outputs=/run/service-state/${name}.service/
|
outputs=/run/service-state/${name}/
|
||||||
mkdir -p $outputs
|
mkdir -p $outputs
|
||||||
(cd $outputs
|
(cd $outputs
|
||||||
echo $1 > ifname
|
echo $1 > ifname
|
||||||
|
|
|
@ -14,7 +14,7 @@ action=$1
|
||||||
|
|
||||||
set_address() {
|
set_address() {
|
||||||
ip address replace $ip/$mask dev $interface
|
ip address replace $ip/$mask dev $interface
|
||||||
dir=/run/service-state/${name}.service/
|
dir=/run/service-state/${name}/
|
||||||
mkdir -p $dir
|
mkdir -p $dir
|
||||||
for i in lease mask ip router siaddr dns serverid subnet opt53 interface ; do
|
for i in lease mask ip router siaddr dns serverid subnet opt53 interface ; do
|
||||||
echo ''${!i} > $dir/$i
|
echo ''${!i} > $dir/$i
|
||||||
|
|
|
@ -16,7 +16,7 @@ let
|
||||||
, notification-fd ? null
|
, notification-fd ? null
|
||||||
, dependencies ? []
|
, dependencies ? []
|
||||||
} @ args: stdenvNoCC.mkDerivation {
|
} @ args: stdenvNoCC.mkDerivation {
|
||||||
name = "${name}.service";
|
inherit name;
|
||||||
serviceType = "longrun";
|
serviceType = "longrun";
|
||||||
buildInputs = dependencies;
|
buildInputs = dependencies;
|
||||||
dependencies = builtins.map (d: d.name) dependencies;
|
dependencies = builtins.map (d: d.name) dependencies;
|
||||||
|
@ -35,7 +35,7 @@ let
|
||||||
} @ args: stdenvNoCC.mkDerivation {
|
} @ args: stdenvNoCC.mkDerivation {
|
||||||
# stdenvNoCC is to avoid generating derivations with names
|
# stdenvNoCC is to avoid generating derivations with names
|
||||||
# like foo.service-mips-linux-musl
|
# like foo.service-mips-linux-musl
|
||||||
name = "${name}.service";
|
inherit name;
|
||||||
serviceType = "oneshot";
|
serviceType = "oneshot";
|
||||||
# does this suffice to make sure dependencies are included
|
# does this suffice to make sure dependencies are included
|
||||||
# even though the built output has no references to their
|
# even though the built output has no references to their
|
||||||
|
@ -62,7 +62,7 @@ let
|
||||||
shell = "${busybox}/bin/sh";
|
shell = "${busybox}/bin/sh";
|
||||||
builder = ./builder.sh;
|
builder = ./builder.sh;
|
||||||
};
|
};
|
||||||
bundle = { name, ... } @args : target (args // { name = "${name}.bundle";});
|
bundle = { name, ... } @args : target (args // { inherit name;});
|
||||||
in {
|
in {
|
||||||
inherit target bundle oneshot longrun output;
|
inherit target bundle oneshot longrun output;
|
||||||
}
|
}
|
||||||
|
|
|
@ -13,10 +13,10 @@ cd $dest_path;
|
||||||
db=nix/store/*-s6-rc-database/compiled/
|
db=nix/store/*-s6-rc-database/compiled/
|
||||||
test -d $db
|
test -d $db
|
||||||
chmod -R +w $db
|
chmod -R +w $db
|
||||||
# check we have closure of config.services (lo.link.service exists only
|
# check we have closure of config.services (lo.link service exists only
|
||||||
# as a dependency)
|
# as a dependency)
|
||||||
test "$(s6-rc-db -c $db type lo.link.service)" = "oneshot"
|
test "$(s6-rc-db -c $db type lo.link)" = "oneshot"
|
||||||
test "$(s6-rc-db -c $db type ntp.service)" = "longrun"
|
test "$(s6-rc-db -c $db type ntp)" = "longrun"
|
||||||
echo OK
|
echo OK
|
||||||
EOF
|
EOF
|
||||||
)
|
)
|
||||||
|
|
Loading…
Reference in a new issue