[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[plamo:29349] Re: Plamo-4.5b2 のinstallpkg について
-
From:M.H
-
Date:Sun, 21 Sep 2008 15:12:12 +0900 (JST)
- Subject: [plamo:29349] Re: Plamo-4.5b2 のinstallpkg について
- From: "M.H" <misty_haiku@xxxxxxxxx>
- Date: Sun, 21 Sep 2008 15:12:11 +0900
こんにちは、M.H です。
# 正直、ここまで深く考えてなかったんですが^^;
インストーラでの起動のことまで考えると、頭がこんぐらかってくるんですけど、
> *** org/sbin/installpkg 2008-09-21 07:57:47.820960373 +0900
> --- new/sbin/installpkg 2008-09-21 08:00:05.237641902 +0900
> ***************
> *** 42,47 ****
> --- 42,48 ----
> case $1 in
> -root) # -root /mnt
> opts="`echo $opts $1 $2`"
> + mnt_point=$2
> shift ; shift
> ;;
> -priority)
> ***************
> *** 99,103 ****
>
> # we are on the running system, so need to run initpkg now.
> if [ -x /etc/rc.d/rc.initpkg ]; then
> ! /etc/rc.d/rc.initpkg
> fi
> --- 100,108 ----
>
> # we are on the running system, so need to run initpkg now.
> if [ -x /etc/rc.d/rc.initpkg ]; then
> ! if [ "$mnt_point.x" = ".x" ]; then
> ! ( cd / ; /etc/rc.d/rc.initpkg )
> ! else
> ! ( cd $mnt_point ; /etc/rc.d/rc.initpkg )
> ! fi
> fi
-- この下から
*** installpkg.before 2008-09-21 13:23:18.000000000 +0900
--- installpkg 2008-09-21 13:23:18.000000000 +0900
***************
*** 99,108 ****
done
# we are on the running system, so need to run initpkg now.
! if [ -x /etc/rc.d/rc.initpkg ]; then
! if [ "$mnt_point.x" = ".x" ]; then
! ( cd / ; /etc/rc.d/rc.initpkg )
! else
! ( cd $mnt_point ; /etc/rc.d/rc.initpkg )
! fi
fi
--- 99,104 ----
done
# we are on the running system, so need to run initpkg now.
! if [ -x "$mnt_point"/etc/rc.d/rc.initpkg ]; then
! ( cd "$mnt_point"/ ; ./etc/rc.d/rc.initpkg )
fi
-- この上まで
> *** org/etc/rc.d/rc.initpkg 2008-09-21 09:19:18.036305493 +0900
> --- new/etc/rc.d/rc.initpkg 2008-09-21 09:33:39.963225657 +0900
> ***************
> *** 3,26 ****
>
> # initialize package with newly installed environment.
> # echo "ldconfig to new libraries"
> ! /sbin/ldconfig
> # Set the hostname.
> #echo -n "Set the hostname: "
> if [ ! -r /etc/HOSTNAME ]; then
> # If there's no /etc/HOSTNAME, fall back on this default.
> ! echo "darkstar.frop.org" > /etc/HOSTNAME
> fi
> - HOST=`cat /etc/HOSTNAME`
> HOST=${HOST%%.*}
> /bin/hostname "$HOST"
>
> while true; do
> DO_INIT=no
> ! for p in `ls -1tr /var/log/initpkg`; do
> ! sh /var/log/initpkg/$p && (rm /var/log/initpkg/$p; DO_INIT=yes)
> # for debugging
> # echo "initpkg:$p" >> /var/log/packages/initpkg.log
> ! # sh /var/log/initpkg/$p 2>&1 | tee -a /var/log/packages/initpkg.log && (rm /var/log/initpkg/$p; DO_INIT=yes)
> done
> if [ "$DO_INIT" = "no" ]; then
> break
> --- 3,27 ----
>
> # initialize package with newly installed environment.
> # echo "ldconfig to new libraries"
> ! ldconfig
> # Set the hostname.
> #echo -n "Set the hostname: "
> if [ ! -r /etc/HOSTNAME ]; then
> # If there's no /etc/HOSTNAME, fall back on this default.
> ! HOST='darkstar.frop.org'
> ! else
> ! HOST=`cat /etc/HOSTNAME`
> fi
> HOST=${HOST%%.*}
> /bin/hostname "$HOST"
>
> while true; do
> DO_INIT=no
> ! for p in `ls -1tr ./var/log/initpkg`; do
> ! sh ./var/log/initpkg/$p && (rm ./var/log/initpkg/$p; DO_INIT=yes)
> # for debugging
> # echo "initpkg:$p" >> /var/log/packages/initpkg.log
> ! # sh ./var/log/initpkg/$p 2>&1 | tee -a ./var/log/packages/initpkg.log && (rm ./var/log/initpkg/$p; DO_INIT=yes)
> done
> if [ "$DO_INIT" = "no" ]; then
> break
-- この下から
*** rc.initpkg.before 2008-09-21 13:26:34.000000000 +0900
--- rc.initpkg 2008-09-21 13:26:34.000000000 +0900
***************
*** 3,9 ****
# initialize package with newly installed environment.
# echo "ldconfig to new libraries"
! ldconfig
# Set the hostname.
#echo -n "Set the hostname: "
if [ ! -r /etc/HOSTNAME ]; then
--- 3,13 ----
# initialize package with newly installed environment.
# echo "ldconfig to new libraries"
! if [ ! -r /etc/ld.so.conf ]; then
! /sbin/ldconfig -r "`/bin/pwd`"
! else
! /sbin/ldconfig
! fi
# Set the hostname.
#echo -n "Set the hostname: "
if [ ! -r /etc/HOSTNAME ]; then
-- この上まで
より統一感が出そうなところを追加パッチにしてみました。
これだと、例えば、後から試しに、
mkdir -p /var/tmp/work
/sbin/installpkg -root /var/tmp/work hoge.tgz
などとして実行した場合に、
/var/tmp/work/etc/rc.d/rc.initpkg が無いので、
/var/tmp/work/var/log/initpkg/hoge が実行されずに残りますが、
それはそれで確認のためには便利でしょうか?
Thanks!
-M.H
- Follow-Ups
-
- [plamo:29350] Re: Plamo-4.5b2 のinstallpkg について, Mikio Tomioka
- [plamo:29351] Re: Plamo-4.5b2 のinstallpkg について, KOJIMA Mitsuhiro
- [plamo:29356] /var/log 以下のログファイル groupについて, Beniya
- References
-
- [plamo:29342] Re: Plamo-4.5b2 のinstallpkg について, KOJIMA Mitsuhiro
- [plamo:29343] Re: Plamo-4.5b2 のinstallpkg について, M.H
- [plamo:29344] Re: Plamo-4.5b2 のinstallpkg について, M.H
- [plamo:29346] Re: Plamo-4.5b2 のinstallpkg について, KOJIMA Mitsuhiro
[検索ページ]
[メール一覧]
Plamo ML 公開システム