commit
1fd13668c0
8 changed files with 192 additions and 258 deletions
|
@ -33,7 +33,7 @@ func InitRouter() *gin.Engine {
|
|||
|
||||
r.GET("/v1/guide/check", v1.GetGuideCheck)
|
||||
|
||||
r.GET("/debug", v1.GetSystemConfigDebug)
|
||||
r.GET("/v1/debug", v1.GetSystemConfigDebug)
|
||||
//set user
|
||||
r.POST("/v1/user/setusernamepwd", v1.Set_Name_Pwd)
|
||||
//get user info
|
||||
|
|
|
@ -262,7 +262,7 @@ func AddPartition(c *gin.Context) {
|
|||
c.JSON(http.StatusOK, model.Result{Success: oasis_err.DISK_BUSYING, Message: oasis_err.GetMsg(oasis_err.DISK_BUSYING)})
|
||||
return
|
||||
}
|
||||
if !file.CheckNotExist("/mnt/" + name) {
|
||||
if !file.CheckNotExist("/DATA/" + name) {
|
||||
// /mnt/name exist
|
||||
c.JSON(http.StatusOK, model.Result{Success: oasis_err.NAME_NOT_AVAILABLE, Message: oasis_err.GetMsg(oasis_err.NAME_NOT_AVAILABLE)})
|
||||
return
|
||||
|
@ -279,7 +279,7 @@ func AddPartition(c *gin.Context) {
|
|||
service.MyService.Disk().AddPartition(path)
|
||||
}
|
||||
|
||||
mountPath := "/mnt/" + name
|
||||
mountPath := "/DATA/" + name
|
||||
|
||||
service.MyService.Disk().MountDisk(path, mountPath)
|
||||
|
||||
|
@ -314,7 +314,7 @@ func PostMountDisk(c *gin.Context) {
|
|||
path := c.PostForm("path")
|
||||
serial := c.PostForm("serial")
|
||||
|
||||
mountPath := "/mnt/volume"
|
||||
mountPath := "/DATA/volume"
|
||||
var list = service.MyService.Disk().GetSerialAll()
|
||||
var pathMapList = make(map[string]string, len(list))
|
||||
for _, v := range list {
|
||||
|
|
|
@ -13,6 +13,8 @@ version_0_2_3() {
|
|||
readonly CASA_DEPANDS="curl smartmontools"
|
||||
version_0_2_5{
|
||||
install_depends "$CASA_DEPANDS"
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
|
||||
# copy to /casaOS/util/shell path
|
||||
# chmod 755
|
||||
|
@ -30,23 +30,32 @@ do_mount() {
|
|||
|
||||
# Figure out a mount point to use
|
||||
# LABEL=${ID_FS_LABEL}
|
||||
LABEL=${DEVBASE}
|
||||
if grep -q " /mnt/casa_${LABEL} " /etc/mtab; then
|
||||
# Already in use, make a unique one
|
||||
LABEL+="-${DEVBASE}"
|
||||
fi
|
||||
DEV_LABEL="${LABEL}"
|
||||
# LABEL=${DEVBASE}
|
||||
# if grep -q " /DATA/USB_${LABEL} " /etc/mtab; then
|
||||
# # Already in use, make a unique one
|
||||
# LABEL+="-${DEVBASE}"
|
||||
# fi
|
||||
# DEV_LABEL="${LABEL}"
|
||||
|
||||
# Use the device name in case the drive doesn't have label
|
||||
if [ -z ${DEV_LABEL} ]; then
|
||||
DEV_LABEL="${DEVBASE}"
|
||||
fi
|
||||
# # Use the device name in case the drive doesn't have label
|
||||
# if [ -z ${DEV_LABEL} ]; then
|
||||
# DEV_LABEL="${DEVBASE}"
|
||||
# fi
|
||||
|
||||
MOUNT_POINT="/mnt/casa_${DEV_LABEL}"
|
||||
MOUNT_POINT="/DATA/USB_Storage1"
|
||||
arr=("/DATA/USB_Storage1" "/DATA/USB_Storage2" "/DATA/USB_Storage3" "/DATA/USB_Storage4" "/DATA/USB_Storage5" "/DATA/USB_Storage6" "/DATA/USB_Storage7" "/DATA/USB_Storage8" "/DATA/USB_Storage9" "/DATA/USB_Storage10" "/DATA/USB_Storage11" "/DATA/USB_Storage12")
|
||||
for folder in ${arr[@]}; do
|
||||
#如果文件夹不存在,创建文件夹
|
||||
if [ ! -d "$folder" ]; then
|
||||
mkdir -p ${folder}
|
||||
MOUNT_POINT=$folder
|
||||
break
|
||||
fi
|
||||
done
|
||||
|
||||
${log} "Mount point: ${MOUNT_POINT}"
|
||||
|
||||
mkdir -p ${MOUNT_POINT}
|
||||
|
||||
|
||||
# # Global mount options
|
||||
# OPTS="rw,relatime"
|
||||
|
@ -84,7 +93,7 @@ do_mount() {
|
|||
mount -t iso9660 ${DEVICE} ${MOUNT_POINT}
|
||||
;;
|
||||
*)
|
||||
/bin/rmdir "${MOUNT_POINT}"
|
||||
/bin/rmdir "${MOUNT_POINT}"
|
||||
exit 0
|
||||
;;
|
||||
esac
|
||||
|
|
347
web/js/2.js
347
web/js/2.js
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue