Deleted Added
full compact
rc.subr (149049) rc.subr (149050)
1# $NetBSD: rc.subr,v 1.60 2003/07/26 05:13:47 lukem Exp $
1# $NetBSD: rc.subr,v 1.60 2003/07/26 05:13:47 lukem Exp $
2# $FreeBSD: head/etc/rc.subr 149049 2005-08-14 17:28:15Z pjd $
2# $FreeBSD: head/etc/rc.subr 149050 2005-08-14 18:02:22Z pjd $
3#
4# Copyright (c) 1997-2002 The NetBSD Foundation, Inc.
5# All rights reserved.
6#
7# This code is derived from software contributed to The NetBSD Foundation
8# by Luke Mewburn.
9#
10# Redistribution and use in source and binary forms, with or without

--- 1304 unchanged lines hidden (view full) ---

1315 _out="${_com}"
1316 else
1317 _out="${_out}${_dst}${_com}"
1318 fi
1319 done
1320 echo "${_out}"
1321}
1322
3#
4# Copyright (c) 1997-2002 The NetBSD Foundation, Inc.
5# All rights reserved.
6#
7# This code is derived from software contributed to The NetBSD Foundation
8# by Luke Mewburn.
9#
10# Redistribution and use in source and binary forms, with or without

--- 1304 unchanged lines hidden (view full) ---

1315 _out="${_com}"
1316 else
1317 _out="${_out}${_dst}${_com}"
1318 fi
1319 done
1320 echo "${_out}"
1321}
1322
1323# Creates a list of providers for GELI encryption.
1324geli_make_list()
1325{
1326 local devices devices2
1327 local provider mountpoint type options rest
1328
1329 # Create list of GELI providers from fstab.
1330 while read provider mountpoint type options rest ; do
1331 case ":${provider}" in
1332 :#*)
1333 continue
1334 ;;
1335 *.eli)
1336 # Skip swap devices.
1337 if [ "${type}" = "swap" -o "${options}" = "sw" ]; then
1338 continue
1339 fi
1340 devices="${devices} ${provider}"
1341 ;;
1342 esac
1343 done < /etc/fstab
1344
1345 # Append providers from geli_devices.
1346 devices="${devices} ${geli_devices}"
1347
1348 for provider in ${devices}; do
1349 provider=${provider%.eli}
1350 provider=${provider#/dev/}
1351 devices2="${devices2} ${provider}"
1352 done
1353
1354 echo ${devices2}
1355}
1356
1323fi
1357fi