init.in-milis

This commit is contained in:
milisbir 2018-09-22 07:01:16 +03:00
parent 46678ba262
commit c1726f0f40
1 changed files with 9 additions and 9 deletions

View File

@ -176,17 +176,17 @@ do_mount_in_ram()
}
find_media() {
EXPECT_LABEL="nutyxcd"
EXPECT_LABEL="milis_calisan"
for SYS in /sys/block/sd* /sys/block/sr* ; do
[ "$verbose" == "no" ] || echo "Looking in $SYS for media"
if [ ! -d "$SYS" ]; then continue; fi
DEV=/dev/${SYS##*/}
LABEL=`dd if=$DEV bs=1 skip=32808 count=32 2>/dev/null`
if [ ${LABEL} == ${EXPECT_LABEL} ] 2>/dev/null ; then
ln -s $DEV /dev/nutyx-cd
ln -s $DEV /dev/cdrom
mkdir -p /media/cdrom 2>/dev/null
[ "$verbose" == "no" ] || echo "mount -n /dev/nutyx-cd /media/cdrom"
mount -n /dev/nutyx-cd /media/cdrom
[ "$verbose" == "no" ] || echo "mount -n /dev/cdrom /media/cdrom"
mount -n /dev/cdrom /media/cdrom
[ -d /media/cdrom/depot ] && echo $DEV > /tmp/depot
break
fi
@ -197,7 +197,7 @@ MainLoop(){
while [ ! -f /root/boot ];
do
[ "$verbose" == "no" ] || echo "Launch /etc/rc.d/init.d/milis-kur ..."
/etc/rc.d/init.d/setup-nutyx || problem
/etc/rc.d/init.d/milis-kur || problem
done
}
@ -255,9 +255,9 @@ if [ -n "$rootdelay" ] ; then
sleep "$rootdelay"
fi
if [ "$root" == "" ]; then
if [ ! -f /etc/rc.d/init.d/setup-nutyx ]; then
if [ ! -f /etc/rc.d/init.d/milis-kur ]; then
find_media
if [ ! -L /dev/nutyx-cd ]; then
if [ ! -L /dev/cdrom ]; then
[ "$verbose" == "no" ] || echo "Media not found yet, trying again in 5 sec"
sleep 5
find_media
@ -270,13 +270,13 @@ if [ "$root" == "" ]; then
else
do_mount_in_ram /boot
fi
if [ ! -f /etc/rc.d/init.d/setup-nutyx ]; then
if [ ! -f /etc/rc.d/init.d/milis-kur ]; then
no_mount
sh
else
if [ "$verbose" == "yes" ]; then
echo "/etc/rc.d/init.d/milis-kur exit ..."
ls -lt /etc/rc.d/init.d/setup-nutyx
ls -lt /etc/rc.d/init.d/milis-kur
fi
fi
# TODO This doesn't works FIXME