1 |
#!/bin/bash |
#!/bin/bash |
2 |
# Magellan Linux Installer Functions (mage.functions.sh) |
# Magellan Linux Installer Functions (mage.functions.sh) |
3 |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.12 2006-01-01 22:59:52 niro Exp $ |
# $Header: /home/cvsd/magellan-cvs/magellan-src/mage/usr/lib/mage/mage4.functions.sh,v 1.13 2006-01-01 23:15:48 niro Exp $ |
4 |
|
|
5 |
mage_setup() |
mage_setup() |
6 |
{ |
{ |
361 |
local pkgname="$1" |
local pkgname="$1" |
362 |
local pathto |
local pathto |
363 |
local posix |
local posix |
364 |
|
local major |
365 |
|
local minor |
366 |
local IFS |
local IFS |
367 |
|
|
368 |
# sanity checks; abort if not given |
# sanity checks; abort if not given |
376 |
# sets fieldseperator to "§" instead of " " |
# sets fieldseperator to "§" instead of " " |
377 |
IFS=§ |
IFS=§ |
378 |
|
|
379 |
while read pathto posix |
while read pathto posix major minor |
380 |
do |
do |
381 |
[ -z "${pathto}" ] && continue |
[ -z "${pathto}" ] && continue |
382 |
[[ ${VERBOSE} = on ]] && echo -e "\t>>> CHAR: ${MROOT}${pathto}" |
[[ ${VERBOSE} = on ]] && echo -e "\t>>> CHAR: ${MROOT}${pathto}" |
383 |
|
|
384 |
mknod -m ${posix} -c "${MROOT}${pathto}" |
mknod -m ${posix} -c "${MROOT}${pathto}" ${major} ${minor} |
385 |
done < ${BUILDDIR}/${pkgname}/.char |
done < ${BUILDDIR}/${pkgname}/.char |
386 |
|
|
387 |
# very important: unsetting the '§' fieldseperator |
# very important: unsetting the '§' fieldseperator |