lxc-plamo.in revision ffeb76b4607be4b241db01ab65989d37b4529c97
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# template script for generating Plamo Linux container for LXC
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# lxc: linux Container library
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# KATOH Yasufumi <karma@jazz.email.ne.jp>
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# TAMUKI Shoichi <tamuki@linet.gr.jp>
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# This library is free software; you can redistribute it and/or
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# modify it under the terms of the GNU Lesser General Public
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# License as published by the Free Software Foundation; either
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# version 2.1 of the License, or (at your option) any later version.
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# This library is distributed in the hope that it will be useful,
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# but WITHOUT ANY WARRANTY; without even the implied warranty of
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# Lesser General Public License for more details.
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# You should have received a copy of the GNU Lesser General Public
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# License along with this library; if not, write to the Free Software
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# ref. https://github.com/Ponce/lxc-slackware/blob/master/lxc-slackware
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi# lxc-ubuntu script
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graber# Detect use under userns (unsupported)
c63c04fcaf1c3a78c70500eae253d72fa9c8358aTAMUKI Shoichi if [ "$arg" == "--mapped-uid" -o "$arg" == "--mapped-gid" ]; then
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graber echo "This template can't be used for unprivileged containers." 1>&2
8ec981fc8b0105da5f071e40811e0c2472a6c3c9Stéphane Graber echo "You may want to try the \"download\" template instead." 1>&2
207bf0e475f1dc6e9a2dac2cee3a209b56427855Stéphane Graber# Make sure the usual locations are in PATH
207bf0e475f1dc6e9a2dac2cee3a209b56427855Stéphane Graberexport PATH=$PATH:/usr/sbin:/usr/bin:/sbin:/bin
8c3a756ed4cf22f9fdab5f95d067321e6ddcc425KATOH YasufumiIGNOREPKGS=${IGNOREPKGS-"grub kernel lilo linux_firmware microcode_ctl
adf4b4083369a8bb7ed3c2ce3dd85dcaed7323c4KATOH Yasufumi cpufreqd cpufrequtils gpm"}
8c3a756ed4cf22f9fdab5f95d067321e6ddcc425KATOH YasufumiADDONPKGS=${ADDONPKGS-"`echo contrib/Hamradio/{morse,qrq}`"}
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi # check the mini plamo was not already downloaded
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi if ! mkdir -p $ptcache ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "Failed to create '$ptcache' directory."
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi case $DLSCHEME in http) depth=2 ;; ftp) depth=3 ;; esac
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi rej=${IGNOREPKGS%% *} ; [ -n "$rej" ] && rej="$rej-*"
8c3a756ed4cf22f9fdab5f95d067321e6ddcc425KATOH Yasufumi if [ `echo $IGNOREPKGS | wc -w` -gt 1 ] ; then
adf4b4083369a8bb7ed3c2ce3dd85dcaed7323c4KATOH Yasufumi for p in ${IGNOREPKGS#* } ; do rej="$rej,$p-*" ; done
adf4b4083369a8bb7ed3c2ce3dd85dcaed7323c4KATOH Yasufumi wget -nv -e robots=off -r -l $depth -nd -A .tgz,.txz -R "$rej" \
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi -I $MIRRORPATH/Plamo-$release/$arch/plamo/$i \
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi -X $MIRRORPATH/Plamo-$release/$arch/plamo/$i/old \
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi $DLSCHEME://$MIRRORSRV$MIRRORPATH/Plamo-$release/$arch/plamo/$i
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi if [ $? -ne 0 ] ; then
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi echo "Failed to download the rootfs, aborting."
adf4b4083369a8bb7ed3c2ce3dd85dcaed7323c4KATOH Yasufumi wget -nv -e robots=off -r -l $depth -nd -A .tgz,.txz -R "$rej" \
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi -I $MIRRORPATH/Plamo-$release/$arch/contrib/$i \
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi -X $MIRRORPATH/Plamo-$release/$arch/contrib/$i/old \
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi $DLSCHEME://$MIRRORSRV$MIRRORPATH/Plamo-$release/$arch/contrib/$i
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi if [ $? -ne 0 ] ; then
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi echo "Failed to download the rootfs, aborting."
adf4b4083369a8bb7ed3c2ce3dd85dcaed7323c4KATOH Yasufumi wget -nv -e robots=off -r -l $depth -nd -A "`basename $p`-*" \
adf4b4083369a8bb7ed3c2ce3dd85dcaed7323c4KATOH Yasufumi -I $MIRRORPATH/Plamo-$release/$arch/`dirname $p` \
adf4b4083369a8bb7ed3c2ce3dd85dcaed7323c4KATOH Yasufumi -X $MIRRORPATH/Plamo-$release/$arch/`dirname $p`/old \
adf4b4083369a8bb7ed3c2ce3dd85dcaed7323c4KATOH Yasufumi $DLSCHEME://$MIRRORSRV$MIRRORPATH/Plamo-$release/$arch/`dirname $p`
adf4b4083369a8bb7ed3c2ce3dd85dcaed7323c4KATOH Yasufumi if [ $? -ne 0 ] ; then
adf4b4083369a8bb7ed3c2ce3dd85dcaed7323c4KATOH Yasufumi echo "Failed to download the rootfs, aborting."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi find $rtcache -mindepth 1 -maxdepth 1 -exec cp -a {} $rootfs \; || return 1
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichi if ! flock -n 9 ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "Checking cache download in $dlcache..."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi if [ ! -d $dlcache ] ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "Failed to download plamo $release base packages."
92cbfdaf682dca9cf60243f23c2e911181bfc7abKATOH Yasufumi if [ ! -x /sbin/installpkg ] ; then
92cbfdaf682dca9cf60243f23c2e911181bfc7abKATOH Yasufumi echo "Installing 'installpkg' command into $dlcache/sbin..."
92cbfdaf682dca9cf60243f23c2e911181bfc7abKATOH Yasufumi ( cd $dlcache ; tar xpJf hdsetup-*.txz ; rm -rf tmp usr var )
92cbfdaf682dca9cf60243f23c2e911181bfc7abKATOH Yasufumi sed -i "/ldconfig/!s@/sbin@$dlcache&@g" $dlcache/sbin/installpkg*
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi if [ ! -d $rtcache ] ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi sed -i 's/="err"/=0/' $rootfs/etc/udev/udev.conf
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi none /var/lib/nfs/rpc_pipefs rpc_pipefs defaults 0 0
db821c3a4168c9c1072a433340e6009892e26cf2KATOH Yasufumi < # What to do when power fails (shutdown to single user).
db821c3a4168c9c1072a433340e6009892e26cf2KATOH Yasufumi < pf::powerfail:/sbin/shutdown -f +5 "THE POWER IS FAILING"
db821c3a4168c9c1072a433340e6009892e26cf2KATOH Yasufumi > pf::powerfail:/sbin/shutdown -h +0 "THE POWER IS FAILING"
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi > 1:1235:respawn:/sbin/agetty 38400 console
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi < c5:1235:respawn:/sbin/agetty 38400 tty5 linux
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi < c6:12345:respawn:/sbin/agetty 38400 tty6 linux
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "127.0.0.1 localhost $name" > $rootfs/etc/hosts
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi ln -s ../usr/share/zoneinfo/Asia/Tokyo $rootfs/etc/localtime
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi # disable pam_loginuid.so in /etc/pam.d/login (for libvirt's lxc driver)
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi sed -i '/pam_loginuid/s/^/#/' $rootfs/etc/pam.d/login
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichi /^mount -w -n -t proc/;/^# ln -s \/bin\/true/-1d
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichi /^mknod \/dev\/unikey/;/^# Clean \/etc\/mtab/-2d
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichi /^# Check the integrity/;/^# Clean up temporary/-1d
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichi /^# Screen blanks/;/^# Initialize ip6tables/-1d
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichi /^# Initialize sysctl/;/^echo "Starting services/-1d
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi head -n-93 $rootfs/sbin/netconfig.tradnet > /tmp/netconfig.rconly
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi RC=$rootfs/etc/rc.d/rc.inet1.tradnet
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi IFCONFIG=sbin/ifconfig
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi ROUTE=sbin/route
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi INET1SCHEME=var/run/inet1-scheme
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi IPADDR=127.0.0.1
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi NETWORK=127.0.0.0
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi DHCPCD=usr/sbin/dhclient
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi make_config_file
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi rm -f $rootfs/etc/rc.d/rc.inet1.tradnet
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi sh /tmp/netconfig.rconly
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi rm -f /tmp/netconfig.rconly
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumicopy_configuration() {
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi cat <<- EOF >> $path/config || let ret++
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi lxc.utsname = $name
bf3e09c00eab82850782ad6ec74e4403d84ae866KATOH Yasufumi lxc.mount = $path/fstab
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi lxc.arch = $arch
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi if [ -f "@LXCTEMPLATECONFIG@/plamo.common.conf" ] ; then
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi cat <<- "EOF" >> $path/config || let ret++
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi lxc.include = @LXCTEMPLATECONFIG@/plamo.common.conf
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi # create the fstab (empty by default)
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi touch $path/fstab || let ret++
7a49a081dd1d4f92e3c82df344709e3206457e46KATOH Yasufumi if [ $ret -ne 0 ] ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "Failed to add configuration."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumipost_process() {
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi # nothing do in Plamo Linux
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumido_bindhome() {
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi # bind-mount the user's path into the container's /home
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi h=`getent passwd $bindhome | cut -d: -f6`
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi mkdir -p $rootfs/$h
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "$h $rootfs/$h none bind 0 0" >> $path/fstab
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi # copy /etc/passwd, /etc/shadow, and /etc/group entries into container
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi if ! pwd=`getent passwd $bindhome` ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "Warning: failed to copy password entry for $bindhome."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo $pwd >> $rootfs/etc/passwd
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo `getent shadow $bindhome` >> $rootfs/etc/shadow
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi [ -d $dlcache -a -d $rtcache ] || return 0
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi # lock, so we won't purge while someone is creating a repository
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichi if ! flock -n 9 ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "Cache repository is busy."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "Purging the download cache..."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi rm -rf --one-file-system $dlcache $rtcache || return 1
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichi ) 9> @LOCALSTATEDIR@/lock/subsys/lxc-plamo
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi $prog [-h|--help] -p|--path=<path> -n|--name=<name> --rootfs=<rootfs>
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichi [--clean] [-r|--release=<release>] [-a|--arch=<arch>]
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichi [-b|--bindhome=<user>]
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi release: $release
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi arch: x86 or x86_64: defaults to host arch
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichi bindhome: bind <user>'s home into the container
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiprog=`basename $0`
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumipath="" ; name="" ; rootfs=""
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumirelease=${release:-5.x}
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiarch=`uname -m | sed 's/i.86/x86/'` ; hostarch=$arch
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichisopts=hp:n:cr:a:b:
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichilopts=help,path:,name:,rootfs:,clean,release:,arch:,bindhome:
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiif ! options=`getopt -o $sopts -l $lopts -- "$@"` ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumieval set -- "$options"
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiwhile true ; do
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi -h|--help) usage && exit 0 ;;
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi -p|--path) path=$2 ; shift 2 ;;
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi -n|--name) name=$2 ; shift 2 ;;
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi --rootfs) rootfs=$2 ; shift 2 ;;
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi -c|--clean) clean=1 ; shift 1 ;;
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi -r|--release) release=$2 ; shift 2 ;;
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi -a|--arch) arch=$2 ; shift 2 ;;
ffeb76b4607be4b241db01ab65989d37b4529c97TAMUKI Shoichi -b|--bindhome) bindhome=$2 ; shift 2 ;;
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi --) shift 1 ; break ;;
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiif [ $clean -eq 1 -a -z "$path" ] ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi cleanup || exit 1
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiif [ $hostarch == "x86" -a $arch == "x86_64" ] ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "Can't create x86_64 container on x86."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiif [ -z "$path" ] ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "'path' parameter is required."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiif [ -z "$name" ] ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "'name' parameter is required."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiif [ `id -u` -ne 0 ] ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "This script should be run as 'root'."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumicache=@LOCALSTATEDIR@/cache/lxc
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiptcache=$cache/partial-${prog##*-}-$release-$arch
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumidlcache=$cache/cache-${prog##*-}-$release-$arch
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumirtcache=$cache/rootfs-${prog##*-}-$release-$arch
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiif [ -z "$rootfs" ] ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi if grep -q "^lxc.rootfs" $path/config ; then
8c3a756ed4cf22f9fdab5f95d067321e6ddcc425KATOH Yasufumi rootfs=`awk -F= '/^lxc.rootfs =/{ print $2 }' $path/config`
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi rootfs=$path/rootfs
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiif ! install_plamo ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "Failed to install plamo $release."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiif ! configure_plamo ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "Failed to configure plamo $release for a container."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiif ! copy_configuration ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi echo "Failed to write configuration file."
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiif [ -n "$bindhome" ] ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumiif [ $clean -eq 1 ] ; then
cab79123082bef9ba265c9c8b9176b8b8afedd64KATOH Yasufumi cleanup || exit 1