Fix bugs and improve modules/services/network-filesystems/openafs-client
svn path=/nixos/trunk/; revision=19751
This commit is contained in:
parent
160b28baa0
commit
86b42fdfbf
@ -16,6 +16,8 @@ let
|
|||||||
cp ${cellServDB} $out/CellServDB
|
cp ${cellServDB} $out/CellServDB
|
||||||
echo "/afs:${cfg.cacheDirectory}:${cfg.cacheSize}" > $out/cacheinfo
|
echo "/afs:${cfg.cacheDirectory}:${cfg.cacheSize}" > $out/cacheinfo
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
openafsPkgs = config.boot.kernelPackages.openafsClient;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
###### interface
|
###### interface
|
||||||
@ -52,7 +54,7 @@ in
|
|||||||
|
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
|
|
||||||
environment.systemPackages = [pkgs.openafsClient];
|
environment.systemPackages = [ openafsPkgs ];
|
||||||
|
|
||||||
environment.etc = [
|
environment.etc = [
|
||||||
{ source = afsConfig;
|
{ source = afsConfig;
|
||||||
@ -71,13 +73,13 @@ in
|
|||||||
preStart = ''
|
preStart = ''
|
||||||
mkdir -m 0755 /afs || true
|
mkdir -m 0755 /afs || true
|
||||||
mkdir -m 0755 -p ${cfg.cacheDirectory} || true
|
mkdir -m 0755 -p ${cfg.cacheDirectory} || true
|
||||||
${pkgs.module_init_tools}/sbin/insmod ${pkgs.openafsClient}/lib/openafs/libafs-*.ko || true
|
${pkgs.module_init_tools}/sbin/insmod ${openafsPkgs}/lib/openafs/libafs-*.ko || true
|
||||||
${pkgs.openafsClient}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} -dynroot -fakestat
|
${openafsPkgs}/sbin/afsd -confdir ${afsConfig} -cachedir ${cfg.cacheDirectory} -dynroot -fakestat
|
||||||
'';
|
'';
|
||||||
|
|
||||||
postStop = ''
|
postStop = ''
|
||||||
umount /afs
|
umount /afs
|
||||||
${pkgs.openafsClient}/sbin/afsd -shutdown
|
${openafsPkgs}/sbin/afsd -shutdown
|
||||||
rmmod libafs
|
rmmod libafs
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user