export initdir hookdirs dsrc dracutmodules modules debug beverbose
# Create some directory structure first
-for d in bin sbin usr/bin usr/sbin usr/lib etc proc sys sysroot dev/pts var/run; do
+for d in bin sbin usr/bin usr/sbin usr/lib etc proc sys sysroot tmp dev/pts var/run; do
mkdir -p "$initdir/$d";
done
[[ "$beverbose" = "yes" ]] && ls -lh "$outfile"
-exit 0
\ No newline at end of file
+exit 0
+
# very simple dhclient-script. All it cares about is bringing the interface
# up, and it does not even try to do anything else.
-LOG=/dhclient.$$.log
-ERR=/network.$$.err
+LOG=/tmp/dhclient.$$.log
+ERR=/tmp/network.$$.err
PATH=$PATH:/sbin:/usr/sbin
. /lib/dracut-lib
getarg rdnetdebug && {
- exec >/dhclient.$interface.$$.out
- exec 2>>/dhclient.$interface.$$.out
+ exec >/tmp/dhclient.$interface.$$.out
+ exec 2>>/tmp/dhclient.$interface.$$.out
set -x
}
namesrv=$new_domain_name_servers
hostname=$new_host_name
-[ -f /net.$interface.override ] && . /net.$interface.override
+[ -f /tmp/net.$interface.override ] && . /tmp/net.$interface.override
# save the offending command and let udev move on if we have an error
trap 'log_err; exit 0' EXIT
setup_interface
set | while read line; do
[ "${line#new_}" = "$line" ] && continue
- echo "$line" >>/net.$netif.dhcpopts
+ echo "$line" >>/tmp/net.$netif.dhcpopts
done
- >/net.$netif.up
+ >/tmp/net.$netif.up
echo online > /sys/class/net/$netif/uevent ;;
*) ;;
esac
netif=$1
# bail immediatly if the interface is already up
-[ -f "/net.$netif.up" ] && exit 0
+[ -f "/tmp/net.$netif.up" ] && exit 0
# loopback is always handled the same way
[ "$netif" = "lo" ] && {
ip link set lo up
ip addr add 127.0.0.1/8 dev lo
- >/net.$netif.up
+ >/tmp/net.$netif.up
exit 0
}
hostname $hostname
}
[ -n "$srv" ] &&
- echo "new_dhcp_server_identifier=$srv" > /net.$netif.dhcpopts
+ echo "new_dhcp_server_identifier=$srv" > /tmp/net.$netif.dhcpopts
- >/net.$netif.up
+ >/tmp/net.$netif.up
echo online > /sys/class/net/$netif/uevent
}
for i in ip srv gw mask hostname; do
eval '[ "$'$i'" ] && echo '$i'="$'$i'"'
- done > /net.$netif.override
- [ -n "$ip" ] && echo bcast= >> /net.$netif.override
+ done > /tmp/net.$netif.override
+ [ -n "$ip" ] && echo bcast= >> /tmp/net.$netif.override
# /sbin/dhclient-script will mark the netif up and generate the online
# event for nfsroot
# XXX add -V vendor class and option parsing per kernel
- dhclient -1 -q -R ${reqs} -pf /dhclient.$netif.pid $netif
+ dhclient -1 -q -R ${reqs} -pf /tmp/dhclient.$netif.pid $netif
}
ip_to_var() {
#!/bin/sh
-for f in /dhclient.*.pid; do
- [ "$f" != "/dhclient.*.pid" ] && kill $(cat $f)
+for f in /tmp/dhclient.*.pid; do
+ [ "$f" != "/tmp/dhclient.*.pid" ] && kill $(cat $f)
done
# XXX need to lock our attempts if we're doing the mount here
getarg rdnetdebug && {
- exec > /nfsroot.$1.$$.out
- exec 2>> /nfsroot.$1.$$.out
+ exec > /tmp/nfsroot.$1.$$.out
+ exec 2>> /tmp/nfsroot.$1.$$.out
set -x
}
[ "$NFS_LOCKED" ] || {
NFS_LOCKED=true
export NFS_LOCKED
- exec flock -xo /nfs.lock -c "$0 $*"
+ exec flock -xo /tmp/nfs.lock -c "$0 $*"
exit 1
}
-[ -e /nfsdone ] && exit 0
+[ -e /tmp/nfsdone ] && exit 0
nfs_done() {
- >/nfsdone
+ >/tmp/nfsdone
exit 0
}
# If we're not doing NFS at all, don't keep banging our head
[ -n "$type" ] || nfs_done
-[ -e /net.$1.dhcpopts ] && . /net.$1.dhcpopts
+[ -e /tmp/net.$1.dhcpopts ] && . /tmp/net.$1.dhcpopts
nfsroot=$(getarg nfsroot)
[ -n "$nfsroot" ] || nfsroot="$new_root_path"