initrd-ssh module: don't check if network is up

We already do this in initrd-network.

+16 -18
+16 -18
nixos/modules/system/boot/initrd-ssh.nix
··· 96 ''; 97 98 boot.initrd.network.postCommands = '' 99 - if [ -n "$hasNetwork" ]; then 100 - mkdir /dev/pts 101 - mount -t devpts devpts /dev/pts 102 103 - echo '${cfg.shell}' > /etc/shells 104 - echo 'root:x:0:0:root:/root:${cfg.shell}' > /etc/passwd 105 - echo 'passwd: files' > /etc/nsswitch.conf 106 107 - mkdir -p /var/log 108 - touch /var/log/lastlog 109 110 - mkdir -p /etc/dropbear 111 - ${optionalString (cfg.hostRSAKey != null) "ln -s ${cfg.hostRSAKey} /etc/dropbear/dropbear_rsa_host_key"} 112 - ${optionalString (cfg.hostDSSKey != null) "ln -s ${cfg.hostDSSKey} /etc/dropbear/dropbear_dss_host_key"} 113 - ${optionalString (cfg.hostECDSAKey != null) "ln -s ${cfg.hostECDSAKey} /etc/dropbear/dropbear_ecdsa_host_key"} 114 115 - mkdir -p /root/.ssh 116 - ${concatStrings (map (key: '' 117 - echo -n ${escapeShellArg key} >> /root/.ssh/authorized_keys 118 - '') cfg.authorizedKeys)} 119 120 - dropbear -s -j -k -E -m -p ${toString cfg.port} 121 - fi 122 ''; 123 124 };
··· 96 ''; 97 98 boot.initrd.network.postCommands = '' 99 + mkdir /dev/pts 100 + mount -t devpts devpts /dev/pts 101 102 + echo '${cfg.shell}' > /etc/shells 103 + echo 'root:x:0:0:root:/root:${cfg.shell}' > /etc/passwd 104 + echo 'passwd: files' > /etc/nsswitch.conf 105 106 + mkdir -p /var/log 107 + touch /var/log/lastlog 108 109 + mkdir -p /etc/dropbear 110 + ${optionalString (cfg.hostRSAKey != null) "ln -s ${cfg.hostRSAKey} /etc/dropbear/dropbear_rsa_host_key"} 111 + ${optionalString (cfg.hostDSSKey != null) "ln -s ${cfg.hostDSSKey} /etc/dropbear/dropbear_dss_host_key"} 112 + ${optionalString (cfg.hostECDSAKey != null) "ln -s ${cfg.hostECDSAKey} /etc/dropbear/dropbear_ecdsa_host_key"} 113 114 + mkdir -p /root/.ssh 115 + ${concatStrings (map (key: '' 116 + echo -n ${escapeShellArg key} >> /root/.ssh/authorized_keys 117 + '') cfg.authorizedKeys)} 118 119 + dropbear -s -j -k -E -m -p ${toString cfg.port} 120 ''; 121 122 };