From 45e331302268490cfb532ea6fe827cba1351ec5b Mon Sep 17 00:00:00 2001 From: Roman Kyrylych Date: Sat, 8 Mar 2008 19:22:48 +0200 Subject: Use full path to binaries everywhere Signed-off-by: Roman Kyrylych --- rc.sysinit | 82 +++++++++++++++++++++++++++++++------------------------------- 1 file changed, 41 insertions(+), 41 deletions(-) (limited to 'rc.sysinit') diff --git a/rc.sysinit b/rc.sysinit index f539fef..6c90ce9 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -17,8 +17,8 @@ printhl "Distributed under the GNU General Public License (GPL)" printsep # mount /proc and our RAM /dev -mount -n -t ramfs none /dev -mount -n -t proc none /proc +/bin/mount -n -t ramfs none /dev +/bin/mount -n -t proc none /proc # Create our default nodes that minilogd may need /bin/mknod /dev/null c 1 3 @@ -26,13 +26,13 @@ mount -n -t proc none /proc /bin/mknod /dev/console c 5 1 # More initial /dev setup that udev doesn't do -ln -snf /proc/self/fd /dev/fd -ln -snf /proc/self/fd/0 /dev/stdin -ln -snf /proc/self/fd/1 /dev/stdout -ln -snf /proc/self/fd/2 /dev/stderr -ln -snf /proc/kcore /dev/core -mkdir /dev/pts -mkdir /dev/shm +/bin/ln -snf /proc/self/fd /dev/fd +/bin/ln -snf /proc/self/fd/0 /dev/stdin +/bin/ln -snf /proc/self/fd/1 /dev/stdout +/bin/ln -snf /proc/self/fd/2 /dev/stderr +/bin/ln -snf /proc/kcore /dev/core +/bin/mkdir /dev/pts +/bin/mkdir /dev/shm # start up our mini logger until syslog takes over @@ -40,17 +40,17 @@ mkdir /dev/shm # anything more serious than KERN_WARNING goes to the console # 'verbose' cmdline parameter enables more messages -if grep -q " verbose" /proc/cmdline; then +if /bin/grep -q " verbose" /proc/cmdline; then /bin/dmesg -n 8 else /bin/dmesg -n 3 fi # mount /sys -mount -n -t sysfs none /sys +/bin/mount -n -t sysfs none /sys # mount usbfs /sbin/modprobe usbcore >/dev/null 2>&1 -grep -qw usbfs /proc/filesystems && mount -n -t usbfs none /proc/bus/usb +/bin/grep -qw usbfs /proc/filesystems && /bin/mount -n -t usbfs none /proc/bus/usb # enable rtc access /bin/mkdir /dev/misc/bin/ @@ -60,12 +60,12 @@ grep -qw usbfs /proc/filesystems && mount -n -t usbfs none /proc/bus/usb HWCLOCK_PARAMS="--hctosys" if [ "$HARDWARECLOCK" = "UTC" ]; then - HWCLOCK_PARAMS="$HWCLOCK_PARAMS --utc" + HWCLOCK_PARAMS="$HWCLOCK_PARAMS --utc" else - HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime" + HWCLOCK_PARAMS="$HWCLOCK_PARAMS --localtime" fi if [ "$USEDIRECTISA" != "no" ]; then - HWCLOCK_PARAMS="$HWCLOCK_PARAMS --directisa" + HWCLOCK_PARAMS="$HWCLOCK_PARAMS --directisa" fi # Set clock early to fix some bugs with filesystem checks @@ -79,8 +79,8 @@ if [ -x /sbin/udevadm -a -d /sys/block ]; then #status "Starting UDev Daemon" /etc/start_udev init stat_busy "Starting UDev Daemon" - mkdir /dev/pts - mkdir /dev/shm + /bin/mkdir /dev/pts + /bin/mkdir /dev/shm /sbin/udevd --daemon stat_done else @@ -102,14 +102,14 @@ if ! [ "$load_modules" = "off" ]; then if [ -d /proc/acpi ]; then stat_busy "Loading standard ACPI modules" ACPI_MODULES="ac battery button fan processor thermal" - k="$(echo $BLACKLIST ${MOD_BLACKLIST[@]} | sed 's|-|_|g')" - j="$(echo ${MODULES[@]} | sed 's|-|_|g')" + k="$(echo $BLACKLIST ${MOD_BLACKLIST[@]} | /bin/sed 's|-|_|g')" + j="$(echo ${MODULES[@]} | /bin/sed 's|-|_|g')" #add disabled MODULES (!) to blacklist - much requested feature for m in ${j}; do [ "$m" != "${m#!}" ] && k="${k} ${m#!}" done # add disablemodules= from commandline to blacklist - k="${k} $(echo ${disablemodules} | sed 's|-|_|g' | sed 's|,| |g')" + k="${k} $(echo ${disablemodules} | /bin/sed 's|-|_|g' | /bin/sed 's|,| |g')" for n in ${ACPI_MODULES}; do if ! echo ${k} | /bin/grep "\<$n\>" 2>&1 >/dev/null; then /sbin/modprobe $n > /dev/null 2>&1 @@ -120,7 +120,7 @@ if ! [ "$load_modules" = "off" ]; then fi # run udev uevents -if pidof -o %PPID /sbin/udevd >/dev/null; then +if /bin/pidof -o %PPID /sbin/udevd >/dev/null; then #status "Loading UDev uevents" /etc/start_udev uevents stat_busy "Loading UDev uevents" udevstart="$(date +%s%0N)" @@ -128,13 +128,13 @@ if pidof -o %PPID /sbin/udevd >/dev/null; then /sbin/udevadm settle stat_done udevend="$(date +%s%0N)" - printhl " UDev uevent processing time: $((($udevend-$udevstart)/1000000))ms\n" + printhl " UDev uevent processing time: $((($udevend-$udevstart)/1000000))ms\n" fi # bring up the loopback interface if [ -d /sys/class/net/lo ]; then stat_busy "Bringing up loopback interface" - ifconfig lo 127.0.0.1 up + /sbin/ifconfig lo 127.0.0.1 up if [ $? -ne 0 ]; then stat_fail else @@ -145,14 +145,14 @@ fi # If using an encrypted root fs, we should find the root dev in the initrd # FIXME: obsoleted by initramfs and udev if [ -e /initrd/dev/mapper/root ]; then - mkdir /dev/mapper 2>/dev/null - cp -a /initrd/dev/mapper/root /dev/mapper/root + /bin/mkdir /dev/mapper 2>/dev/null + /bin/cp -a /initrd/dev/mapper/root /dev/mapper/root fi # If necessary, find md devices and manually assemble RAID arrays if [ -f /etc/mdadm.conf -a "$(grep ^ARRAY /etc/mdadm.conf 2>/dev/null)" ]; then # udev won't create these md nodes, so we do it ourselves - for dev in $(grep ^ARRAY /etc/mdadm.conf | awk '{print $2}'); do + for dev in $(/bin/grep ^ARRAY /etc/mdadm.conf | /bin/awk '{print $2}'); do path=$(echo $dev | sed 's|/[^/]*$||') node=$(echo $dev | sed "s|^$path/||") minor=$(echo $node | sed 's|^[^0-9]*||') @@ -165,7 +165,7 @@ fi # FIXME: obsoleted by initramfs if [ -f /initrd/linuxrc ]; then stat_busy "Freeing memory from Initial Ramdisk" - umount /initrd 2>/dev/null + /bin/umount /initrd 2>/dev/null /sbin/blockdev --flushbufs /dev/rd/0 2>/dev/null stat_done fi @@ -186,7 +186,7 @@ if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then fi # Set up non-root encrypted partition mappings -if [ -f /etc/crypttab -a -n "$(grep -v ^# /etc/crypttab | grep -v ^$)" ]; then +if [ -f /etc/crypttab -a -n "$(/bin/grep -v ^# /etc/crypttab | /bin/grep -v ^$)" ]; then /sbin/modprobe -q dm-mod 2>/dev/null stat_busy "Unlocking encrypted volumes:" csfailed=0 @@ -211,7 +211,7 @@ if [ -f /etc/crypttab -a -n "$(grep -v ^# /etc/crypttab | grep -v ^$)" ]; then $CS -d /dev/urandom $copts create $cname $csrc >/dev/null if [ $? -eq 0 ]; then stat_append "creating swapspace.." - mkswap -L $cname /dev/mapper/$cname >/dev/null + /sbin/mkswap -L $cname /dev/mapper/$cname >/dev/null fi fi elif [ "${cpass}" = "ASK" ]; then @@ -284,7 +284,7 @@ if [ -x /sbin/fsck ]; then echo "* *" echo "************************************************************" echo - sleep 15 + /bin/sleep 15 else echo echo "***************** FILESYSTEM CHECK FAILED ****************" @@ -314,16 +314,16 @@ stat_busy "Mounting Local Filesystems" # make sure / gets written to /etc/mtab /bin/mount -o remount,rw / # re-mount /proc , /sys and usbfs so they can be written to /etc/mtab -umount /proc/bus/usb +/bin/umount /proc/bus/usb if [ -e /proc/mounts ]; then - grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab + /bin/grep -e "/proc " -e "/sys " -e "/dev " /proc/mounts >> /etc/mtab fi -if grep -qw usbfs /proc/filesystems; then +if /bin/grep -qw usbfs /proc/filesystems; then # Some people use custom permissions for their usbfs - if grep -v "^#" /etc/fstab | grep -qw /proc/bus/usb ; then - mount /proc/bus/usb + if /bin/grep -v "^#" /etc/fstab | /bin/grep -qw /proc/bus/usb ; then + /bin/mount /proc/bus/usb else - mount -t usbfs none /proc/bus/usb + /bin/mount -t usbfs none /proc/bus/usb fi fi # now mount all the local filesystems @@ -356,11 +356,11 @@ stat_busy "Removing Leftover Files" /bin/rm -f /var/lock/* &>/dev/null /bin/rm -rf /tmp/* /tmp/.* &>/dev/null /bin/rm -f /forcefsck &>/dev/null -(cd /var/run && find . ! -type d -exec rm -f -- {} \; ) +(cd /var/run && /usr/bin/find . ! -type d -exec /bin/rm -f -- {} \; ) : > /var/run/utmp # Keep {x,k,g}dm happy with xorg -mkdir /tmp/.ICE-unix && chmod 1777 /tmp/.ICE-unix -mkdir /tmp/.X11-unix && chmod 1777 /tmp/.X11-unix +/bin/mkdir /tmp/.ICE-unix && /bin/chmod 1777 /tmp/.ICE-unix +/bin/mkdir /tmp/.X11-unix && /bin/chmod 1777 /tmp/.X11-unix stat_done #status "Updating Shared Library Links" /sbin/ldconfig @@ -379,7 +379,7 @@ status "Updating Module Dependencies" /sbin/depmod -A # Flush old locale settings : >/etc/profile.d/locale.sh -chmod 755 /etc/profile.d/locale.sh +/bin/chmod 755 /etc/profile.d/locale.sh # Set user defined locale [ -z "$LOCALE" ] && LOCALE="en_US" stat_busy "Setting Locale: $LOCALE" @@ -454,7 +454,7 @@ fi # Save our dmesg output from this boot if [ -f /var/log/dmesg.log ]; then - rm /var/log/dmesg.log + /bin/rm /var/log/dmesg.log fi /bin/dmesg > /var/log/dmesg.log -- cgit v1.2.3