diff options
Diffstat (limited to 'abs/core/udev/udev.install')
-rw-r--r-- | abs/core/udev/udev.install | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/abs/core/udev/udev.install b/abs/core/udev/udev.install index b4ce3c8..2c92add 100644 --- a/abs/core/udev/udev.install +++ b/abs/core/udev/udev.install @@ -19,9 +19,18 @@ post_install() { ROOTDIR="" [ "$(stat -c %D /)" != "$(stat -c %D /dev)" ] && ROOTDIR=$(mktemp -d /tmp/udevinstall.XXXXXX) [ -n "${ROOTDIR}" ] && mount --bind / ${ROOTDIR} - [ -c ${ROOTDIR}/dev/console ] || mknod -m600 ${ROOTDIR}/dev/console c 5 1 - [ -c ${ROOTDIR}/dev/null ] || mknod -m644 ${ROOTDIR}/dev/null c 1 3 - [ -c ${ROOTDIR}/dev/zero ] || mknod -m644 ${ROOTDIR}/dev/zero c 1 5 + if [ ! -c ${ROOTDIR}/dev/console ]; then + rm -f ${ROOTDIR}/dev/console + mknod -m600 ${ROOTDIR}/dev/console c 5 1 + fi + if [ ! -c ${ROOTDIR}/dev/null ]; then + rm -f ${ROOTDIR}/dev/null + mknod -m644 ${ROOTDIR}/dev/null c 1 3 + fi + if [ ! -c ${ROOTDIR}/dev/zero ]; then + rm ${ROOTDIR}/dev/zero + mknod -m644 ${ROOTDIR}/dev/zero c 1 5 + fi if [ -n "${ROOTDIR}" ]; then umount ${ROOTDIR} rmdir ${ROOTDIR} |