mirror of the now-defunct rocklinux.org
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

61 lines
1.7 KiB

  1. #!/bin/sh
  2. #
  3. # --- ROCK-COPYRIGHT-NOTE-BEGIN ---
  4. #
  5. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  6. # Please add additional copyright information _after_ the line containing
  7. # the ROCK-COPYRIGHT-NOTE-END tag. Otherwise it might get removed by
  8. # the ./scripts/Create-CopyPatch script. Do not edit this copyright text!
  9. #
  10. # ROCK Linux: rock-src/package/base/sysfiles/system.init
  11. # ROCK Linux is Copyright (C) 1998 - 2006 Clifford Wolf
  12. #
  13. # This program is free software; you can redistribute it and/or modify
  14. # it under the terms of the GNU General Public License as published by
  15. # the Free Software Foundation; either version 2 of the License, or
  16. # (at your option) any later version. A copy of the GNU General Public
  17. # License can be found at Documentation/COPYING.
  18. #
  19. # Many people helped and are helping developing ROCK Linux. Please
  20. # have a look at http://www.rocklinux.org/ and the Documentation/TEAM
  21. # file for details.
  22. #
  23. # --- ROCK-COPYRIGHT-NOTE-END ---
  24. #
  25. # Desc: udev /dev setup
  26. # Runlevel: 02 rcX rc1 rc2 rc3 rc4 rc5
  27. #
  28. [[ "$(uname -r)" != 2.6.* ]] && exit 0
  29. main_begin
  30. block_begin(start, `Setting up a udev based /dev directory.')
  31. if [ ! -e /dev/.udev ] ; then
  32. mount -n -t ramfs ramfs /dev || exit $?
  33. cp -r /lib/udev/devices/* /dev
  34. echo "" > /proc/sys/kernel/hotplug
  35. check(`/sbin/udevd --daemon')
  36. # create nodes for devices already in kernel
  37. /sbin/udevtrigger
  38. /sbin/udevsettle
  39. exec > /dev/console 2>&1 < /dev/console
  40. echo "Mounted /dev (udev) from udev init script."
  41. fi
  42. block_end
  43. block_begin(stop, `Stopping udevd.')
  44. check(`killall -15 /sbin/udevd')
  45. dnl
  46. block_split(`Unmounting /dev (udev).')
  47. if [ -e /dev/.udev ] ; then
  48. umount -l -n /dev
  49. exec > /dev/console 2>&1 < /dev/console
  50. fi
  51. block_end
  52. main_end